public void EquipeWeapen(RuntimeWeapen w, bool isLeft) { if (isLeft) { if (leftHandWeapen != null) { leftHandWeapen.weapenModel.SetActive(false); } leftHandWeapen = w; } else { if (rightHandWeapen != null) { rightHandWeapen.weapenModel.SetActive(false); } rightHandWeapen = w; } string targetIdle = w.instance.oh_idle; targetIdle += isLeft ? "_l" : "_r"; states.anim.SetBool(StaticStrings.mirror, isLeft); states.anim.Play(StaticStrings.changeWeapen); states.anim.Play(targetIdle); UI.QuickSlot uiSlot = UI.QuickSlot.singleton; uiSlot.UpdateSlot(isLeft?UI.QSlotType.lh:UI.QSlotType.rh, w.instance.icon); w.weapenModel.SetActive(true); }
void Awake() { singleton = this; }
public void EquipSpell(RuntimeSpellItems spell) { currentSpell = spell; UI.QuickSlot uislot = UI.QuickSlot.singleton; uislot.UpdateSlot(UI.QSlotType.spell, spell.instance.icon); }