Daycycle finished
This commit is contained in:
parent
e9f4f3344b
commit
a24cb01365
6 changed files with 18 additions and 18 deletions
|
|
@ -17,8 +17,6 @@ public class HouseController : MonoBehaviour {
|
|||
|
||||
void Start() {
|
||||
newDayEvent ??= new UnityEvent();
|
||||
|
||||
newDayEvent.AddListener(newDay);
|
||||
}
|
||||
|
||||
public void newDay() {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ public class PlayerController : MonoBehaviour {
|
|||
public static PlayerController getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ public class TileBehaviour : MonoBehaviour
|
|||
{
|
||||
Debug.Log("Created");
|
||||
SetTile(new GrassTile());
|
||||
|
||||
HouseController.NewDayEvent.AddListener(tile.DayLightStep);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
|
@ -26,11 +28,11 @@ public class TileBehaviour : MonoBehaviour
|
|||
Debug.Log("Clicked");
|
||||
|
||||
// SelectedItem always null for now
|
||||
BaseTile temp = tile.Clicked(PlayerController.getInstance().SelectedItem);
|
||||
if (temp != null)
|
||||
{
|
||||
SetTile(temp);
|
||||
}
|
||||
//BaseTile temp = tile.Clicked(PlayerController.getInstance().SelectedItem);
|
||||
//if (temp != null)
|
||||
//{
|
||||
// SetTile(temp);
|
||||
//}
|
||||
}
|
||||
|
||||
void SetTile(BaseTile tileToSet)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Tiles
|
|||
|
||||
public void DayLightStep()
|
||||
{
|
||||
|
||||
Debug.Log("I evolve");
|
||||
}
|
||||
|
||||
public BaseTile Clicked(UsableItem usable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue