예제 #1
0
    void AddSpell(string spellName)
    {
        if (PF_GameData.Spells.ContainsKey(spellName))
        {
            FG_SpellDetail spellData = PF_GameData.Spells[spellName];
            FG_Spell       sp        = new FG_Spell()
            {
                SpellName   = spellName,
                Target      = spellData.Target,
                ApplyStatus = spellData.ApplyStatus,
                Cooldown    = spellData.Cooldown,
                Description = spellData.Description,
                Dmg         = spellData.BaseDmg,
                Icon        = spellData.Icon,
                FX          = spellData.FX,
                RangeX      = spellData.RangeX,
                RangeY      = spellData.RangeY,
                LevelReq    = spellData.LevelReq
            };

            //if (savedCharacter.characterData.CharacterLevel >= sp.LevelReq)
            //{
            this.mySpells.Add(spellName, sp);
            this.unitController.spellController.SetupSpellFX(sp);
            //}
            //else
            //Debug.Log(string.Format("character level : {0} is too low to use spell : {1} and required level : {2}.", savedCharacter.characterData.CharacterLevel, sp.SpellName, sp.LevelReq));
        }
        else
        {
            Debug.LogError(" Do not contain this spell data : __ " + spellName);
        }
    }
예제 #2
0
 //copy ctor
 public FG_SpellDetail(FG_SpellDetail prius)
 {
     if (prius != null)
     {
         this.Description = prius.Description;
         this.Icon        = prius.Icon;
         this.Target      = prius.Target;
         this.BaseDmg     = prius.BaseDmg;
         this.ManaCost    = prius.ManaCost;
         this.BaseDmg     = prius.BaseDmg;
         //this.UpgradePower = prius.UpgradePower;
         //this.UpgradeLevels = prius.UpgradeLevels;
         this.FX          = prius.FX;
         this.Cooldown    = prius.Cooldown;
         this.LevelReq    = prius.LevelReq;
         this.ApplyStatus = new FG_SpellStatus(prius.ApplyStatus);
     }
 }