♻️ Optimizations of the various system
🍱 Retexture of the enemy portal
This commit is contained in:
@@ -69,7 +69,7 @@ public partial class BaseTile : Node2D
|
||||
public virtual bool TakeDamage(int damage)
|
||||
{
|
||||
if (IsDestroyed || IsConstructing) return false;
|
||||
|
||||
|
||||
GD.Print($"[Tile] {TileId} {GetInstanceId()} took {damage} damage");
|
||||
|
||||
CurrentDurability = Mathf.Max(0, CurrentDurability - damage);
|
||||
@@ -136,6 +136,9 @@ public partial class BaseTile : Node2D
|
||||
protected virtual void OnTileDestroyed()
|
||||
{
|
||||
// Can be overridden by derived classes for custom destruction behavior
|
||||
var cell = GridUtils.WorldToGrid(Position);
|
||||
var buildingInfo = Registry.GetBuilding(TileId);
|
||||
Grid.FreeArea(cell, buildingInfo.Size, Rotation, buildingInfo.Layer);
|
||||
}
|
||||
|
||||
// Building progress visualization
|
||||
|
Reference in New Issue
Block a user