Ejemplo n.º 1
0
    /*
     * Kill the player
     */
    public void Die()
    {
        IsDead           = true;
        collider.enabled = false;

        // Change the background to neutral
        ChangeColors(ColorWheel.neutral);
        redPower.ResetPower();
        greenPower.ResetPower();
        bluePower.ResetPower();

        GameManager.Instance.EndRun();
        audio.PlayOneShot(deathSound);
        PigmentBody body = (PigmentBody)playerGeo.GetComponent <PigmentBody> ();

        body.ReplaceWithRagdoll();

        // pause running animation
        playerGeo.animation["pigment_run"].speed = 0.0f;
    }