public static MineManager get() { if(_instance == null) { Logger.Log("MineManager::get was badly initialized", Logger.Level.WARN); _instance = GameObject.Find(gameObjectName).GetComponent<MineManager>(); } return _instance; }
protected override void Awake() { base.Awake(); mineManager = GameController.Instance.MineManager; animator = gameObject.GetComponentInChildren <Animator>(); DepositAction = (x) => { MyArea.DepositContainer.AddToContainer(x); }; }
private void Awake() { coroutineRunner = Instantiate(coroutineRunnerPrefab).GetComponent <ICoroutineRunner>(); pointsManagerScript = pointsManager.GetComponent <PointsManager>(); uiManagerScript = uiManager.GetComponent <UIManager>(); gameManagerScript = gameManager.GetComponent <GameManager>(); mineManagerScript = mineManager.GetComponent <MineManager>(); pointsManagerScript.Initialize(pointsToEarn, uiManagerScript, coroutineRunner); gameManagerScript.Initialize(pointsManagerScript); mineManagerScript.Initialize(pointsManagerScript); }
void Awake() { Logger.Log("MineManager::Awake", Logger.Level.DEBUG); _instance = this; }