Example #1
0
 public void ChangeOperation(Item item, IActorPart part)
 {
     if (part.GetGear().GetEquipSlotName(equipment) != String.EquipSlotName.None)
     {
         opt.Change("取下", TakeOffItem, ChangeOperation, CollectItem);
     }
     else
     {
         opt.Change("装备", EquipItem, ChangeOperation);
     }
 }
Example #2
0
 public void SetUp(IActorPart actor)
 {
     backpack?.RemoveOnAddItemListener(AddNewItem);
     backpack?.RemoveOnRemoveItemListener(RemoveItem);
     backpack = actor.GetBackpack();
     panel.Init(this);
     Start();
     backpack.AddOnAddItemListener(AddNewItem);
     backpack.AddOnRemoveItemListener(RemoveItem);
     gearUI.SetUp(actor.GetGear());
 }
Example #3
0
 protected void TakeOffItem(Item item, IActorPart part)
 {
     part.GetGear().TakeOff(equipment);
 }
Example #4
0
 protected void EquipItem(Item item, IActorPart part)
 {
     part.GetGear().Equip(equipment);
 }