コード例 #1
0
 /// <summary>
 /// 卸下
 /// </summary>
 public void Unload()
 {
     equipmentCursor.cursorImage.transform.parent.GetComponent <EquipmentContainer>().RemoveEquipment();           //装备栏container remove//UI
     EquipmentSystemInfo.RemoveEquipmentFromSlot(equipmentCursor.selectedEquipment);                               //装备栏信息remove//信息
     //////////////////////////////////////////////////////////////////////////
     equipmentsSlots[(int)equipmentCursor.selectedEquipment.type].SetEquipment(equipmentCursor.selectedEquipment); //装备背包信息container set//UI
     ////////////////////////////////////////////////////////////////////////
     EquipmentSystemInfo.AddEquipmentToList(equipmentCursor.selectedEquipment);                                    //装备栏信息 add//信息
     equipmentCursor.selectedEquipment = null;                                                                     //设定光标未选定任何装备
 }
コード例 #2
0
 /// <summary>
 /// 装备
 /// </summary>
 public void Equip()
 {
     if (equipmentCursor.selectedEquipment == null)
     {
         return;
     }
     equipmentCursor.cursorImage.transform.parent.GetComponent <EquipmentContainer>().RemoveEquipment();           //背包container remove//UI
     EquipmentSystemInfo.RemoveEquipmentFromList(equipmentCursor.selectedEquipment);                               //背包信息remove//信息
     equipmentsSlots[(int)equipmentCursor.selectedEquipment.type].SetEquipment(equipmentCursor.selectedEquipment); //装备栏container set//UI
     EquipmentSystemInfo.AddEquipmentToSlot(equipmentCursor.selectedEquipment);                                    //装备栏信息 add//信息
     equipmentCursor.selectedEquipment = null;                                                                     //设定光标未选定任何装备
 }