private void SetSpellProperties(Spell spell, GameObject spellDummy) { // Set the spell properties (form and effect) SpellUtil createdSpell = spellDummy.GetComponent <SpellUtil>(); createdSpell.form = spell.form; createdSpell.effect = spell.effect; createdSpell.caster = this.gameObject; Debug.Log("Set Spell Properties"); }
public SummonerManager() { //Initializing all summoner spells _spellUtil = new SpellUtil(); flash = _spellUtil.GetSkillshotSpell(SpellUtil.Summoners.Flash); ignite = _spellUtil.GetTargettedSpell(SpellUtil.Summoners.Ignite); exhaust = _spellUtil.GetTargettedSpell(SpellUtil.Summoners.Exhaust); smite = _spellUtil.GetTargettedSpell(SpellUtil.Summoners.Smite); heal = _spellUtil.GetActiveSpell(SpellUtil.Summoners.Heal); barrier = _spellUtil.GetActiveSpell(SpellUtil.Summoners.Barrier); ghost = _spellUtil.GetActiveSpell(SpellUtil.Summoners.Ghost); cleanse = _spellUtil.GetActiveSpell(SpellUtil.Summoners.Cleanse); }
public void ToFirstSpell() { var dict = new Dictionary <string, Tuple <string, string> >() { { "梅钰", new Tuple <string, string>("my", "MY") }, { "张洺", new Tuple <string, string>("zm", "ZM") }, { "王玥", new Tuple <string, string>("wy", "WY") }, { "王思琪", new Tuple <string, string>("wsq", "WSQ") }, { "董云强", new Tuple <string, string>("dyq", "DYQ") }, { "宋红培", new Tuple <string, string>("shp", "SHP") }, { "石磊", new Tuple <string, string>("sl", "SL") } }; foreach (var item in dict) { var name = item.Key; var spell1 = item.Value.Item1; var spell2 = item.Value.Item2; Assert.Equal(SpellUtil.ToFirstSpell(name, false), spell1); Assert.Equal(SpellUtil.ToFirstSpell(name), spell2); } }
public void ToAllSpell() { var dict = new Dictionary <string, Tuple <string, string> >() { { "梅钰", new Tuple <string, string>("meiyu", "MEIYU") }, { "张洺", new Tuple <string, string>("zhangming", "ZHANGMING") }, { "王玥", new Tuple <string, string>("wangyue", "WANGYUE") }, { "王思琪", new Tuple <string, string>("wangsiqi", "WANGSIQI") }, { "董云强", new Tuple <string, string>("dongyunqiang", "DONGYUNQIANG") }, { "宋红培", new Tuple <string, string>("songhongpei", "SONGHONGPEI") }, { "石磊", new Tuple <string, string>("shilei", "SHILEI") } }; foreach (var item in dict) { var name = item.Key; var spell1 = item.Value.Item1; var spell2 = item.Value.Item2; Assert.Equal(SpellUtil.ToAllSpell(name, false), spell1); Assert.Equal(SpellUtil.ToAllSpell(name), spell2); } }