public void EquipSpells(RuntimeSpellItems spell)
        {
            currentSpell = spell;

            UI.QuickSlot uiSlot = UI.QuickSlot.singleton;
            uiSlot.UpdateSlot(UI.QSlotType.spell, spell.instance.icon);
        }
        public void EquipConsumable(RuntimeConsumable consum)
        {
            curConsumable = consum;

            UI.QuickSlot uiSlot = UI.QuickSlot.singleton;
            uiSlot.UpdateSlot(UI.QSlotType.item, consum.instance.icon);
        }
        public void EquipWeapon(RuntimeWeapon w, bool isLeft = false)
        {
            string targetIdle = w.instance.oh_idle;

            targetIdle += (isLeft) ? StaticStrings._l : StaticStrings._r;

            states.anim.SetBool(StaticStrings.mirror, isLeft);
            states.anim.Play(StaticStrings.changeWeapon);
            states.anim.Play(targetIdle);

            UI.QuickSlot uiSlot = UI.QuickSlot.singleton;
            uiSlot.UpdateSlot((isLeft) ? UI.QSlotType.lh : UI.QSlotType.rh, w.instance.icon);

            w.weaponModel.SetActive(true);
        }
        public void EquipWeapon(RuntimeWeapon w, bool isLeft = false)
        {
            if (isLeft)
            {
                if (leftHandWeapon != null)
                {
                    leftHandWeapon.weaponModel.SetActive(false);
                }
                //(2)
                leftHandWeapon = w;
            }
            else
            {
                if (rightHandWeapon != null)
                {
                    rightHandWeapon.weaponModel.SetActive(false);
                }
                //(2)
                rightHandWeapon = w;
            }

            string targetIdle = w.instance.oh_idle;

            targetIdle += (isLeft) ? "_l" : "_r";

            if (isLeft == true)
            {
                for (int i = 0; i < leftHandWeapon.instance.actions.Count; i++)
                {
                    leftHandWeapon.instance.actions[i].mirror = true;
                }
            }

            states.anim.SetBool("mirror", isLeft);
            states.anim.Play("changeWeapon");
            states.anim.Play(targetIdle);

            UI.QuickSlot uiSlot = UI.QuickSlot.singleton;
            uiSlot.UpdateSlot((isLeft) ? UI.QSlotType.lh : UI.QSlotType.rh, w.instance.icon);

            w.weaponModel.SetActive(true);
        }
示例#5
0
 void Awake()
 {
     singleton = this;
 }