Added cooldown to robots not executing scripts, fixed movement bug where robots don't execute script if on the same tile.
This commit is contained in:
@@ -112,6 +112,14 @@ public partial class Robot : Node3D
|
||||
|
||||
currentMessage = "No script executing";
|
||||
}
|
||||
else
|
||||
{
|
||||
CoolDown(
|
||||
delta,
|
||||
GameData.robotStats.GetCoolingRate(IdleHeatLossPerSecond)
|
||||
* TypeStats.CoolingMultiplier
|
||||
);
|
||||
}
|
||||
|
||||
Visible = Math.Round(Math.Abs(Position.Y / GameData.tileHeight), 0) == GameData.visibleLayer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user