public override void Init(Entity ownner) { base.Init(ownner); m_EquipmentMap.Add((int)InventoryEquipSlot.Helmet, EquipmentFactory.CreateEquipment(role.data.equipmentData.helmetID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Torso, EquipmentFactory.CreateEquipment(role.data.equipmentData.torsoID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Hands, EquipmentFactory.CreateEquipment(role.data.equipmentData.handsID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Legs, EquipmentFactory.CreateEquipment(role.data.equipmentData.legsID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Hips, EquipmentFactory.CreateEquipment(role.data.equipmentData.hipsID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Shoulders, EquipmentFactory.CreateEquipment(role.data.equipmentData.shouldersID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Back, EquipmentFactory.CreateEquipment(role.data.equipmentData.backID)); m_EquipmentMap.Add((int)InventoryEquipSlot.Weapon, EquipmentFactory.CreateTestEquipment(WeaponType.TwoHandAxe)); }
private void OnClickEquip() { if (m_Weapon != null) { return; } if (role.controlComponent.weaponSwitching) { return; //正在切换中 } m_Weapon = EquipmentFactory.CreateTestEquipment(m_WeaponType); role.equipComponent.Equip(m_Weapon); UpdateBtn(); }