Exemple #1
0
    private void Update()
    {
        if (shouldDrop)
        {
            timeLeft -= Time.deltaTime;
            if (timeLeft <= 0)
            {
                timeLeft = timeBetweenBombs;

                TimedBomb newBomb = Instantiate(bomb, transform.position, Quaternion.Euler(0, 0, 0));
                newBomb.StartCountDown(bombTimer, bombDamage);
            }
        }
    }
 void OnBombReadyToExplode(TimedBomb bomb)
 {
     allowInput      = false;
     bomb.OnExplode -= new TimedBomb.ExplodeDelegate(OnBombReadyToExplode);
 }