Exemple #1
0
    private void SetDelayedAction(float delay)
    {
        if (delay <= 0)
        {
            return;
        }

        if (delayedAction != null)
        {
            Destroy(delayedAction);
        }

        delayedAction = DelayedAction.Do(DoAfterDelay, delay);
    }
Exemple #2
0
 private void OnPlayerDeath(Ship ship)
 {
     PlaySound.PlayerDeath();
     DelayedAction.Do(Design.gameController.GameOver, DelayBeforeGameOver);
 }
Exemple #3
0
 private void Start()
 {
     DelayedAction.Do(DestroySelf, lifeTime);
 }