Files
Fruitomation/Assets/Scripts/Game/Buildings/HeatExchanger.cs
Pasha dfce7deb17 Heat Exchanger Stuff
Added heat exchanger building
2026-04-27 19:16:58 +01:00

32 lines
837 B
C#

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
}
}
}
}
}