// treasure void Start() { maze = Object.Instantiate(Resources.Load <GameObject>("maze"), Vector3.zero, Quaternion.identity); treasure = Object.Instantiate(Resources.Load <GameObject>("treasure_chest"), Vector3.zero, Quaternion.identity); player = gameObject.AddComponent <Player>() as Player; userGUI = gameObject.AddComponent <UserGUI>() as UserGUI; director = SSDirector.getInstance(); director.currentSceneController = this; patrolFactory = new PatrolFactory(); actionManager = gameObject.AddComponent <PatrolManager>() as PatrolManager; for (int i = 0; i < 9; i++) { actionManager.PatrolAround(patrolFactory.getPatrol(i)); } initTreasure(); }