Ejemplo n.º 1
0
    public void Die()
    {
        _perch.Unperch();
        EventListener.Death();
        DisablePlayerController();
        _state              = PlayerState.Dying;
        _data.Stats.Deaths += 1;
        GetComponent <CircleCollider2D>().enabled = false;
        _playerRigidBody.gravityScale             = GravityScale;
        _playerRigidBody.velocity = new Vector2(1, 0);
        _rush.GamePaused(true);
        Lantern.Drop();

        transform.localScale   *= 4;
        transform.localRotation = Quaternion.identity;
        _anim.Play("Die", 0, 0.25f);
    }