Foerming/Assets/Scripts/Tiles/GrassTile.cs
2022-05-19 16:13:53 +02:00

27 lines
No EOL
793 B
C#

using UnityEngine;
namespace Tiles
{
public class GrassTile : BaseTile
{
public GrassTile() : base(Color.green)
{
}
/// <summary>
/// to be invoked when the Tile is clicked, handles the actions following on the click
/// </summary>
/// <param name="usable">the UsableItem that the Tile was clicked on with</param>
/// <returns>a subclass of BaseTile if the Tile has to change, null if it stays the same type</returns>
public new BaseTile Clicked(UsableItem usable) {
base.Clicked(usable);
BaseTile rv = null;
if (usable.displayName == "Hoe")
{
rv = new FarmlandTile();
}
return rv;
}
}
}