Example #1
0
    public void LeveltwoSpell(int lvl2choiceNOW)
    {
        CastSpell cast   = CastSpell.FindObjectOfType <CastSpell>();
        Meteor    meteor = Meteor.GetComponent <Meteor>();
        GhostCast ghost  = GhostCast.GetComponent <GhostCast>();
        Cone      cone   = Cone.GetComponent <Cone>();

        if (lvl2choiceNOW == 1)
        { // Meteor
            cast.damage2Pure   = meteor.damagePure;
            cast.aoeSizeMeteor = meteor.aoeSize;
            cast.cd2Pure       = meteor.cooldownSeconds;
            cast.ghostCast     = false; // needs to be here to remove ghostchast
            cast.cone          = false;
        }

        if (lvl2choiceNOW == 2)
        { // Cone - Aoe infront of caster.
            cast.cone          = cone.cone;
            cast.damage2Pure   = cone.damagePure;
            cast.cd2Pure       = cone.cooldownSeconds;
            cast.aoeSizeMeteor = 0f;
            cast.ghostCast     = false;
        }

        if (lvl2choiceNOW == 3)
        { //GhostCast (spells pass through enemies).
            cast.damage2Pure   = ghost.damagePure;
            cast.ghostCast     = ghost.ghostCast;
            cast.cd2Pure       = ghost.cooldownSeconds;
            cast.aoeSizeMeteor = 0f; // needs to be here to remove the meteor thingy..
            cast.cone          = false;
        }
        if (lvl2choiceNOW == 0)
        {
            cast.damage2Pure   = 0f;
            cast.aoeSizeMeteor = 0f;
            cast.cd2Pure       = 0f;
            cast.cone          = false;
            cast.ghostCast     = false;
        }
    }
Example #2
0
 public void Start()
 {
     gm         = FindObjectOfType <GameManager>();
     fire       = AllSpells[0].GetComponent <Fireball>();
     frost      = AllSpells[1].GetComponent <FrostBolt>();
     lightning  = AllSpells[2].GetComponent <LightningBolt>();
     meteor     = AllSpells[5].GetComponent <Meteor>();
     cone       = AllSpells[3].GetComponent <Cone>();
     ghostcast  = AllSpells[4].GetComponent <GhostCast>();
     doublecast = AllSpells[6].GetComponent <DoubleCast>();
     splitcast  = AllSpells[7].GetComponent <SplitCast>();
     companion  = AllSpells[8].GetComponent <Companion>();
     boost      = AllSpells[9].GetComponent <Boost>();
     hasten     = AllSpells[10].GetComponent <Hasten>();
     empower    = AllSpells[11].GetComponent <Empower>();
     blackhole  = AllSpells[12].GetComponent <BlackHole>();
     push       = AllSpells[13].GetComponent <Push>();
     pool       = AllSpells[14].GetComponent <Pool>();
     chaosorb   = AllSpells[15].GetComponent <ChaosOrb>();
     channling  = AllSpells[16].GetComponent <Channeling>();
     blessedaim = AllSpells[17].GetComponent <BlessedAim>();
 }