//Initialize Method of this class private void Init() { prefab_walls = Resources.Load("Prefabs/Walls") as GameObject; prefab_background = Resources.Load("Prefabs/Background") as GameObject; currentState = GameState.INIT; previousState = GameState.NULL; stageManagement = StageManagement.GetInstance(); playerManagement = PlayerManagement.GetInstance(); enemyManagement = EnemyManagement.GetInstance(); uiManagment = UIManagement.GetInstance(); itemManagement = ItemManagement.GetInstance(); scoreManagement = ScoreManagement.GetInstance(); soundManagement = SoundManagement.GetInstance(); StartCoroutine(CheckState()); }
private void SpawnWhite() { if (currentState != BehaviourState.INIT || currentState != BehaviourState.DIE) { if (!isWhiteEquipped && PlayerManagement.GetInstance().GetCurrentState() == GameManagement.GameState.PLAY) { whiteSpawnElapsedTime += Time.fixedDeltaTime; if (whiteSpawnElapsedTime > PLAYER_WHITE_SPAWN_TIME) { isWhiteEquipped = true; UIManagement.GetInstance().GetGameSceneBG_white().SetActive(true); whiteSpawnElapsedTime = 0; } } } }