public IEnumerator SpawnWave() { monoBehaviour = GameObject.Find("MonoBehaviourObject").GetComponent <MonoBehaviourObject>(); gameControllerLevel2 = GameObject.FindGameObjectWithTag("GameControllerLevel2").GetComponent <GameControllerLevel2>(); //script da controladora do jogo gameControllerLevel2.pauseWaves = true; //pausa a aparição dos outros inimigos int objectCount = levelObjects.Length; for (int count = 0; count < objectCount; count++) { monoBehaviour.StartCoroutine(levelObjects[count].Spawn()); while (!levelObjects[count].terminou) { yield return(null); //continua execução do loop no próximo frame } } gameControllerLevel2.pauseWaves = false; //retorna a aparição dos outros inimigos yield return(null); }
void Start() { try { objGameController = GameObject.FindGameObjectWithTag("GameControllerLevel2"); if (objGameController == null) { throw new UnityException("É necessário ter o objeto 'Game Controller' para o chefe funcionar."); } gameControllerLevel2 = objGameController.GetComponent <GameControllerLevel2>(); if (gameControllerLevel2 == null) { throw new UnityException("O objeto 'Game Controller' precisa ter o script 'GameController.cs'."); } } catch (System.Exception ex) { if (ex.Message != null) { Debug.Log(ex.Message); } } damageAC = GetComponent <Animator>(); }
private void Start() { controller = GameControllerLevel2.Instance; UIEventListener.Get(PeoplesButton).onClick += PeoplesButtonClick; UIEventListener.Get(OOButton).onClick += OOButtonClick; }
public void StartTraining() { gui = BaseGUI.instance; controller = GameControllerLevel2.Instance; flatNavigation = FlatNavigation.instance; gui.IsTrainingNow = true; StartCoroutine(StartStep1()); }
void Awake() { Instance = this; SocialLogic = new SocialEntityLogic(); MoodCharacter = new MoodCharacterEntity(); QuizGame = new QuizeGameEntity { IsQuizeGame = true }; Achievements = new AchievementLogic(); HouseTechnology = new HouseTechnologyEntityJeka2(); HouseActionSocial = new HouseActionSocialEntity(); Offers = new OffersLogic(); PhoneEntities = new List<PhoneEntity>(); AudioL.SetActive(false); AudioL.SetActive(true); }