Implemented dice rolling.

This commit is contained in:
Max Dodd 2025-01-19 18:59:50 +01:00
parent 4bd34a1335
commit 2b08dc425f
15 changed files with 1419 additions and 4 deletions

View file

@ -4,21 +4,24 @@ using Object = UnityEngine.Object;
public enum GameState
{
PickRoom
PickRoom,
RollDice
}
public class GameManager : MonoBehaviour
{
public GameState state;
public GameObject rooms;
public DiceRoller diceRoller;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
state = GameState.PickRoom;
state = GameState.RollDice;
foreach (Transform roomTransform in rooms.transform)
{
roomTransform.gameObject.GetComponent<Room>().ValidRoomClicked += ValidRoomClicked;
}
diceRoller.RollDice();
}
void ValidRoomClicked(object sender, Room room) {
@ -27,4 +30,8 @@ public class GameManager : MonoBehaviour
room.SetRoomExplored();
}
}
void SetUpDice() {
}
}