IEnumerator destroyTutorial(float time) { yield return(new WaitForSeconds(time)); indexTutorial++; lastTutorial = currenteTutorial; Destroy(lastTutorial); yield return(new WaitForSeconds(2.0f)); countTouch = 0; if (indexTutorial < arrayTutorial.Length) { currenteTutorial = arrayTutorial[indexTutorial]; } activeCoroutine = true; if (indexTutorial >= arrayTutorial.Length) { camera.setLockCamera(false); MoveOn.search().startMoveOn(3, MOVEON.RIGHT); Destroy(gameObject); } }
IEnumerator destroy() { bool _exit = true; while (_exit) { if (!airCraft.isPlaying) { MoveOn.search().startMoveOn(3, moveOnRight ? MOVEON.LEFT : MOVEON.RIGHT); Destroy(this.gameObject); _exit = !_exit; } } yield return(null); }
void Update() { if (this.activeLogicalScript) { if (this.amountEnemyDie >= this.amountEnemyTotal) { cameraF.setLockCamera(false); MoveOn.search().startMoveOn(2, moveOnRight ? MOVEON.LEFT : MOVEON.RIGHT); gameObject.SetActive(false); } else if (this.amountEnemyInPlay < this.amountEnemyInScene && this.amountEnemyCreateTotal < this.amountEnemyTotal && this.canCreate) { StartCoroutine(DrawEnemy(waitingTimeInstanteateEnemy)); } } }