private void OnDestroy() { if (!myGameController.isGameFailed()) { if (!myGameController.isScrolling) { myGameController.gameSuspended = false; } myGameController.afterAttack(); myWarningController.isImageDisplay(true); myWarningController.nextAttackWarning(myEnemy.getNextAttackNumber()); if (transform.position.y < 0f) { myTowerScrollScript.scrollBack(destoriedHeight); } } }
public void gameStartWarning() { nextAttackNumber = Random.Range(0, 3); myWarningController.nextAttackWarning(nextAttackNumber); }