Skip to Content
Procedural Content Generation for Unity Game Development
book

Procedural Content Generation for Unity Game Development

by Ryan Watkins
January 2016
Beginner
260 pages
5h 48m
English
Packt Publishing
Content preview from Procedural Content Generation for Unity Game Development

GameManager

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

2D Game Development with Unity

2D Game Development with Unity

Franz Lanzinger
Unity Game Development Cookbook

Unity Game Development Cookbook

Paris Buttfield-Addison, Jon Manning, Tim Nugent

Publisher Resources

ISBN: 9781785287473Supplemental Content