private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } mazeCamera = Instantiate(mazeCamera); mazeCamera.transform.SetParent(transform); mazeGenerationManager = Instantiate(mazeGenerationManager); mazeGenerationManager.transform.SetParent(transform); uiManager = Instantiate(uiManager); uiManager.transform.SetParent(transform); inputManager = Instantiate(inputManager); inputManager.transform.SetParent(transform); playerManager = Instantiate(playerManager); playerManager.transform.SetParent(transform); }
new void Awake() { base.Awake(); if (_helpingHandPrefab == null) { _helpingHandPrefab = Resources.Load("Prefabs/HelpingHand") as GameObject; } _roomCamera = GetComponentInChildren<MazeCamera>(); _exitSet = GetComponentInChildren<MazeExitSet>(); }
private void Start() { localMazeCamera = GameInstance.Instance.mazeCamera; }