Daycycle finished

This commit is contained in:
s-prechtl 2022-05-19 14:21:22 +02:00
parent e9f4f3344b
commit a24cb01365
6 changed files with 18 additions and 18 deletions

View file

@ -17,8 +17,6 @@ public class HouseController : MonoBehaviour {
void Start() {
newDayEvent ??= new UnityEvent();
newDayEvent.AddListener(newDay);
}
public void newDay() {

View file

@ -17,7 +17,6 @@ public class PlayerController : MonoBehaviour {
public static PlayerController getInstance() {
return instance;
}
// Start is called before the first frame update
void Start()

View file

@ -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)

View file

@ -29,7 +29,7 @@ namespace Tiles
public void DayLightStep()
{
Debug.Log("I evolve");
}
public BaseTile Clicked(UsableItem usable)