Stratasys-450mc-VR/Assets/Scripts/Part Labels/PartExplosionController.cs

26 lines
569 B
C#

using UnityEngine;
namespace Part_Labels
{
public class PartExplosionController : MonoBehaviour
{
[SerializeField] private Animation animation;
[SerializeField] private AnimationClip exploisionClip,resetClip;
[ContextMenu("Explode")]
public void ExplodeAnimation()
{
animation.clip = exploisionClip;
animation.Play();
}
[ContextMenu("Reset")]
public void Reset()
{
animation.clip = resetClip;
animation.Play();
}
}
}