Ejemplo n.º 1
0
    public void affectCreature(CreatureClass cc)
    {
        switch (effectType)
        {
        case 1:     //Damage spell X
            cc.takeDamage(e_value);
            Debug.Log("(Spell)Damage on creature: " + cc.name);
            break;

        case 2:     //Heal spell X
            cc.takeHealing(e_value);
            Debug.Log("(Spell)Heal on creature: " + cc.name);
            break;

        case 3:     //Drain arcana X
            cc.spendArcana(e_value);
            Debug.Log("(Spell)Arcana drained on creature: " + cc.name);
            break;

        case 4:     //Full arcana MAX
            cc.setArcana(cc.getMaxArcana());
            Debug.Log("(Spell)Arcana maxed for creature: " + cc.name);
            break;

        case 5:     //Buff defense +1
            cc.setDefense(cc.getDefense() + 1f);
            Debug.Log("(Spell)Defense buffed for creature: " + cc.name);
            break;

        default:
            Debug.Log("spell effect hit default");
            break;
        }
    }
Ejemplo n.º 2
0
    public void UpdateUI(GameObject Creature, bool show)
    {
        if (Creature == null)
        {
            ShowUI(false);
            return;
        }

        if (show == false)
        {
            ShowUI(false);
        }
        else
        {
            ShowUI(true);
        }
        CreatureClass cCreature = Creature.GetComponent <CreatureClass>();

        SetName(cCreature.getName());
        SetHealth(cCreature.getHealth(), cCreature.getMaxHealth());
        SetArcana(cCreature.getArcana(), cCreature.getMaxArcana());
        SetExp(cCreature.getExp(), cCreature.getMaxExp());
        SetSprite(cCreature.getSprite());
    }