Exemplo n.º 1
0
    private IEnumerator KillPlayerCoroutine()
    {
        PlayerPrefs.SetInt("YourScore", m_totalPoints);
        Destroy(this.gameObject);
        ExplosionMaster.Explode(transform.position);
        //TODO: include code for animation here
        yield return(new WaitForSeconds(DEATH_ANIMATION_TIME));

        SceneManager.LoadScene(Levels.GAME_OVER_LEVEL);
    }
Exemplo n.º 2
0
Arquivo: Car.cs Projeto: phelow/OhDeer
 void Explode()
 {
     ExplosionMaster.Explode(transform.position);
     //TODO: put in explosion mechanics
     Destroy(this.gameObject);
 }