Stratasys-450mc-VR/Assets/Scripts/Managers/GuideAnimationManager.cs

26 lines
711 B
C#
Raw Normal View History

2023-11-01 10:51:29 -04:00
using System.Collections.Generic;
using SO;
using UnityEngine;
namespace Managers
{
public class GuideAnimationManager : AnimationManager
{
[SerializeField] private List<GuideObjectsSO> guideObjects;
[SerializeField] private AnimationClip turnOffAnimation;
protected override void PlayAnimation()
{
foreach (var item in guideObjects)
{
if (item.animationClip == animationPlayer.clip)
{
item.guideObjects.SetActive(true);
}
}
base.PlayAnimation();
animationPlayer.PlayQueued(turnOffAnimation.name);
}
}
}