using Fruitomation.Global; using UnityEngine; namespace Fruitomation.Game { public class SlicerBuilding : Building { [Header("Slicer Specific Items")] [SerializeField] private Animator SlicerAnimator; private void Update() { if (GameStateController.Is(GameState.Simulation)) { if (SlicerAnimator.speed == 0) { SlicerAnimator.Play(0, 0, 0f); // Play from beginning SlicerAnimator.speed = 1; // Playing } } else { if (SlicerAnimator.speed != 0) { SlicerAnimator.Play(0, 0, 0f); // Jump back to default frame SlicerAnimator.speed = 0; // Paused } } } } }