Heat Exchanger Stuff

Added heat exchanger building
This commit is contained in:
2026-04-23 14:31:11 +01:00
parent 84d0e1d115
commit dfce7deb17
13 changed files with 1168 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
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
}
}
}
}
}