Ejemplo n.º 1
0
    public void HealPlayer(int amount)
    {
        if (health + amount > healthMax)
        {
            health = healthMax;
        }
        else
        {
            health += amount;
        }

        abilityUIManager.UpdateHealth(health, healthMax);
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        velocity     = Vector3.zero;
        health       = healthMax;
        invulnerable = false;
        gold         = 0;
        walls        = new List <GameObject>();

        modifierAdds = new List <Item>();

        abilityUIManager = GameObject.Find(Constants.GAMEOBJECT_NAME_CANVAS).GetComponent <AbilityUIManager>();

        abilities[0]             = gameObject.AddComponent <Ability_MagicBlast>();
        abilities[0].abilitySlot = 0;

        abilityUIManager.UpdateHealth(health, healthMax);
    }