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