rewilding #20

Open
ktyl wants to merge 8 commits from rewilding into main
3 changed files with 9 additions and 0 deletions
Showing only changes of commit 1bbb11b042 - Show all commits

View File

@ -53,6 +53,7 @@ public class WorldGrid : Node2D
var tile = _tileGrid[idx];
tile.type = tileType;
tile = tileType.ApplySpawneffect(tile);
_tileGrid[x, y] = tile;
}
#endregion

View File

@ -17,4 +17,6 @@ public class TileType : Resource
public float HeatGeneration { get; private set; }
public override string ToString() => Name;
public virtual Tile ApplySpawneffect(Tile tile) => tile;
}

View File

@ -4,4 +4,10 @@ public class Wild : TileType, IDamageable
{
[Export]
public float Threshold { get; private set; }
public override Tile ApplySpawneffect(Tile tile)
{
tile.currentHealth = 0;
return tile;
}
}