Implemented dice rolling.
This commit is contained in:
parent
4bd34a1335
commit
2b08dc425f
15 changed files with 1419 additions and 4 deletions
|
|
@ -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() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue