示例#1
0
    IEnumerator CastSpell7AfterTime(float time, PartyMemberScript target)
    {
        yield return new WaitForSeconds(time);
        if (target.isActiveAndEnabled)
        {
            ManaBar.value -= SpellStats.GetManaCost(Spell.Spell7);
            target.ModifyHealthBy(SpellStats.GetHealAmount(Spell.Spell7), Spell.Spell7);
        }

        PartyMemberScript lowest = ReturnLowestHealthMember();

        if (lowest.isActiveAndEnabled)
            lowest.ModifyHealthBy(SpellStats.GetHealAmount(Spell.Spell7), Spell.Spell7);
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        CastBar.value = 0;
        CastBarFill.gameObject.SetActive(false);
        Tank = GameObjectTank.GetComponent<PartyMemberScript>();
        DPS1 = GameObjectDPS1.GetComponent<PartyMemberScript>();
        DPS2 = GameObjectDPS2.GetComponent<PartyMemberScript>();
        DPS3 = GameObjectDPS3.GetComponent<PartyMemberScript>();
        Healer = GameObjectHealer.GetComponent<PartyMemberScript>();

        Tank.partyMember = ApplicationStatics.Tank;
        DPS1.partyMember = ApplicationStatics.DPS1;
        DPS2.partyMember = ApplicationStatics.DPS2;
        DPS3.partyMember = ApplicationStatics.DPS3;
        Healer.partyMember = ApplicationStatics.Healer;

        Tank.InitHeightAndWidth(160.0f, 216.318f);
        DPS1.InitHeightAndWidth(160.0f, 216.318f);
        DPS2.InitHeightAndWidth(160.0f, 216.318f);
        DPS3.InitHeightAndWidth(160.0f, 216.318f);
        Healer.InitHeightAndWidth(213.3333f, 270.3975f);

        Tank.ModifyHealthBy(Tank.partyMember.MaxHealth, Spell.Enemy);
        DPS1.ModifyHealthBy(DPS1.partyMember.MaxHealth, Spell.Enemy);
        DPS2.ModifyHealthBy(DPS2.partyMember.MaxHealth, Spell.Enemy);
        DPS3.ModifyHealthBy(DPS3.partyMember.MaxHealth, Spell.Enemy);
        Healer.ModifyHealthBy(Healer.partyMember.MaxHealth, Spell.Enemy);
    }
示例#3
0
 IEnumerator CastSingleTargetSpellAfterTime(float time, PartyMemberScript target, int amount, Spell healingSpell)
 {
     yield return new WaitForSeconds(time);
     if (target.isActiveAndEnabled)
     {
         ManaBar.value -= SpellStats.GetManaCost(healingSpell);
         target.ModifyHealthBy(amount, healingSpell);
     }
 }