WaterTile.cs + Shovel.asset

This commit is contained in:
s-prechtl 2022-06-08 11:44:22 +02:00
parent efc7a3deaf
commit 1a12d986c4
6 changed files with 72 additions and 15 deletions

View file

@ -16,12 +16,14 @@ namespace Tiles
/// <returns>a subclass of BaseTile if the Tile has to change, null if it stays the same type</returns>
public override BaseTile Clicked(UsableItem usable) {
BaseTile rv = null;
ItemContainer ic = ItemContainer.Instance;
if (usable != null)
{
base.Clicked(usable);
if (usable.id == ItemContainer.Instance.GetItemIdByName(new string("Hoe")))
{
if (usable.id == ic.GetItemIdByName("Hoe")) {
rv = new FarmlandTile();
} else if (usable.id == ic.GetItemIdByName("Shovel")) {
rv = new WaterTile();
}
}
return rv;