Ejemplo n.º 1
0
    //Explosion effects
    private IEnumerator Boom()
    {
        rocketStage = RocketStage.destroyed;
        if (slowMotionController.CheckDistance())
        {
            CameraController.checkJoinedCounter--;
        }
        progressManager.OnRocketExplosion();
        rocketMove = null;
        RocketView.SetActive(false);
        boomEffect.Play();
        yield return(new WaitUntil(() => !boomEffect.isPlaying));

        yield return(new WaitForEndOfFrame());

        gameObject.SetActive(false);
        rocketSpawner.pool.Enqueue(gameObject);
        rocketSpawner.rocketInGame--;
    }
Ejemplo n.º 2
0
    protected void ChangeMode(GameManager.GameMode gameMode)
    {
        switch (gameMode)
        {
        case GameManager.GameMode.Game:
            rocketMove = RocketMove;
            break;

        case GameManager.GameMode.Death:
            slowMotionController.CkeckEvent = null;
            if (rocketStage != RocketStage.destroyed)
            {
                StartCoroutine(Boom());
            }
            break;

        default:
            break;
        }
    }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     RocketPositionNormalized();
     rocketMove = RocketMove;
 }