January 2016
Beginner
260 pages
5h 48m
English
There are some small updates that we need to add to the GameManager class so that we can connect the Dungeon Board data to the BoardManager and Player classes. The GameManager class will use some driver functions to pass information to and from the different classes and initiate the dungeon generation. The update is shown in Code Snip 4.9:
16 private DungeonManager dungeonScript; 17 private Player playerScript; … 22 void Awake() { 23 if (instance == null) 24 instance = this; 25 else if (instance != this) 26 Destroy(gameObject); 27 28 DontDestroyOnLoad(gameObject); 29 30 enemies = new List<Enemy>(); 31 32 boardScript = GetComponent<BoardManager> (); 33 34 dungeonScript = GetComponent<DungeonManager> (); 35 playerScript = GameObject.FindGameObjectWithTag ...