Exemplo n.º 1
0
    protected override void Update()
    {
        base.Update();

        if (!isDead)
        {
            health.Regen();
            mana.Regen();
        }
    }
    protected override void Update()
    {
        base.Update();

        if (isDead)
        {
            return;
        }

        health.Regen();
        mana.Regen();

        // Check if player has fallen into the abyss
        if (transform.position.y < GameManager.Instance.playerDeathZone)
        {
            Die();
        }
    }