void DoCompare() { GameObject go = Fsm.GetOwnerDefaultTarget(gameObject); if (go == null) { return; } mBasicInventory = go.GetComponent <BasicInventory>(); int lWeaponSetIndex = (checkCurrentSet ? -1 : weaponSet.Value); if (mBasicInventory != null) { if (mBasicInventory.IsWeaponSetEquipped(lWeaponSetIndex)) { store.Value = true; Fsm.Event(trueEvent); } else { store.Value = false; Fsm.Event(falseEvent); } } }
internal override string Tick() { if (m_InventorySource.IsWeaponSetEquipped(m_WeaponSetID)) { m_IsMotionActive = false; return("Weapon set already equipped"); } if (!m_IsMotionActive) { m_InventorySource.EquipWeaponSet(m_WeaponSetID); m_IsMotionActive = true; return(""); } return("Equip motion is already active."); }
void Equip() { GameObject go = Fsm.GetOwnerDefaultTarget(gameObject); if (go == null) { return; } mBasicInventory = go.GetComponent <BasicInventory>(); int lWeaponSetIndex = (UseCurrentSet ? -1 : weaponSet.Value); if (mBasicInventory != null) { if (mBasicInventory.IsWeaponSetEquipped(lWeaponSetIndex)) { Finish(); return; } mBasicInventory.EquipWeaponSet(lWeaponSetIndex); } }