runnable
This commit is contained in:
parent
7a04d79aba
commit
470aeff3f3
4 changed files with 3659 additions and 3 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -2,6 +2,8 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using Cursor = UnityEngine.Cursor;
|
||||
|
||||
public class PlayerController : MonoBehaviour {
|
||||
#region Singleton
|
||||
|
|
@ -40,4 +42,8 @@ public class PlayerController : MonoBehaviour {
|
|||
Debug.Log("An item requested to select isn't in the inventory" + item);
|
||||
}
|
||||
}
|
||||
|
||||
public UsableItem GetSelectedItem() {
|
||||
return selectedItem;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ public class TileBehaviour : MonoBehaviour
|
|||
void OnMouseDown()
|
||||
{
|
||||
Debug.Log("Clicked");
|
||||
UsableItem usable = PlayerController.getInstance().SelectedItem;
|
||||
UsableItem usable = PlayerController.instance.GetSelectedItem();
|
||||
BaseTile tileToSetTo = null;
|
||||
if (usable.GetType() == typeof(TerraformingTool))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Tiles
|
|||
public new BaseTile Clicked(UsableItem usable) {
|
||||
base.Clicked(usable);
|
||||
BaseTile rv = null;
|
||||
if (usable.GetType() == typeof(Items.Hoe))
|
||||
if (usable.displayName == "Hoe")
|
||||
{
|
||||
rv = new FarmlandTile();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue