public RuntimeSpellItems SpellToRuntimeSpell(Spell s, bool isLeft = false)
        {
            GameObject        go   = new GameObject();
            RuntimeSpellItems inst = go.AddComponent <RuntimeSpellItems>();

            inst.instance = new Spell();
            StaticFunctions.DeepCopySpell(s, inst.instance);
            go.name = s.itemName;
            r_spells.Add(inst);
            return(inst);
        }
        public void CreateSpellPartcle(RuntimeSpellItems inst, bool isLeft, bool parentUnderRoot = false)
        {
            if (inst.currentParticle == null)
            {
                inst.currentParticle = Instantiate(inst.instance.particlePrefab) as GameObject;
                inst.p_hook          = inst.currentParticle.GetComponentInChildren <ParticleHook>();
                inst.p_hook.Init();
            }

            if (!parentUnderRoot)
            {
                Transform p = states.anim.GetBoneTransform(isLeft ? HumanBodyBones.LeftHand : HumanBodyBones.RightHand);
                inst.currentParticle.transform.parent        = p;
                inst.currentParticle.transform.localRotation = Quaternion.identity;
                inst.currentParticle.transform.localPosition = Vector3.zero;
            }
            else
            {
                inst.currentParticle.transform.parent        = transform;
                inst.currentParticle.transform.localRotation = Quaternion.identity;
                inst.currentParticle.transform.localPosition = new Vector3(0, 1.5f, 0.9f);
            }
        }
 public void EquipSpell(RuntimeSpellItems spell)
 {
     currentSpell = spell;
     UI.QuickSlot uislot = UI.QuickSlot.singleton;
     uislot.UpdateSlot(UI.QSlotType.spell, spell.instance.icon);
 }