Added heat exchanger building

This commit is contained in:
2026-04-23 14:53:43 +01:00
parent 44de4a8a8c
commit d7b9845b51
11 changed files with 824 additions and 0 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
}
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2a40d30ecee1430c9a21ab42f4290132
timeCreated: 1776951500