apply spawn effect
This commit is contained in:
parent
8c55e2131f
commit
1bbb11b042
|
@ -53,6 +53,7 @@ public class WorldGrid : Node2D
|
|||
|
||||
var tile = _tileGrid[idx];
|
||||
tile.type = tileType;
|
||||
tile = tileType.ApplySpawneffect(tile);
|
||||
_tileGrid[x, y] = tile;
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue