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); } }
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()); }
protected void TakeOffItem(Item item, IActorPart part) { part.GetGear().TakeOff(equipment); }
protected void EquipItem(Item item, IActorPart part) { part.GetGear().Equip(equipment); }