using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SimpleRotationFX : MonoBehaviour
{
    public float rotationSpeed = 30f;
    public RotationalAxis rotationAxis;

    Vector3 axis;

    private void Start()
    {
        switch (rotationAxis)
        {
            case RotationalAxis.X:
                axis = Vector3.right;
                break;
            case RotationalAxis.Y:
                axis = Vector3.up;
                break;
            case RotationalAxis.Z:
                axis = Vector3.forward;
                break;
            default:
                break;
        }
    }

    // Update is called once per frame
    void Update()
    {
        transform.Rotate(axis * rotationSpeed * Time.deltaTime);
    }

    private void OnEnable()
    {
        
    }

    private void OnDisable()
    {
        this.transform.localRotation = Quaternion.identity;
    }
}
public enum RotationalAxis
{
    X,
    Y,
    Z
}
