private void RemoveSpell(ExtraSpellType type) { if (!_dic_extraSpells.ContainsKey(type)) { return; } _dic_extraSpells[type].Disappear(); _dic_extraSpells.Remove(type); }
//Privates private void AddSpell(ExtraSpellType type, Vector3 position, Vector3 scale, CharacterVisual owner) { if (_dic_extraSpells.ContainsKey(type)) { DivineDebug.Log("Already has this Extra effect: " + type.ToString() + " owner: " + owner.moniker); return; } GameObject prefab = PrefabProvider_Battle.instance.GetPrefab_ExtraSpell(type.ToString()); GameObject extraSpellGameObj = GameObject.Instantiate(prefab); IExtraSpell extraSp = extraSpellGameObj.GetComponent <IExtraSpell>(); extraSp.Appear(position, scale, owner); _dic_extraSpells.Add(type, extraSp); }