예제 #1
0
    void Muere()
    {
        Rotar            rotar            = transform.parent.GetComponent <Rotar>();
        FantasmaSeEscapa fantasmaSeEscapa = transform.parent.GetComponent <FantasmaSeEscapa>();
        int puntuacion = (int)((100 * rotar.radioActual) / fantasmaSeEscapa.radioAlcanzadoParaEscaparse);

        estadoJuego.IncrementarPuntuacion(puntuacion);

        Instantiate(explosionPrefab, transform.position, transform.rotation);
        Destroy(gameObject.transform.parent.gameObject);
    }