fixed SelectedItem when no item
This commit is contained in:
parent
8e64a009f5
commit
93809f5052
3 changed files with 24 additions and 6 deletions
|
|
@ -20,14 +20,17 @@ namespace Tiles
|
|||
public override BaseTile Clicked(UsableItem usable)
|
||||
{
|
||||
BaseTile rv = null;
|
||||
base.Clicked(usable);
|
||||
_crop.Clicked(usable);
|
||||
|
||||
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.Id)
|
||||
if (usable != null)
|
||||
{
|
||||
rv = new GrassTile(_gameObject);
|
||||
base.Clicked(usable);
|
||||
_crop.Clicked(usable);
|
||||
|
||||
if (ItemContainer.Instance.GetItemIdByName("Shovel") == usable.Id)
|
||||
{
|
||||
rv = new GrassTile(_gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue