UIEquipmentSlot.cs 501 B

1234567891011121314151617181920212223
  1. using System;
  2. using UnityEngine;
  3. [AddComponentMenu("NGUI/Examples/UI Equipment Slot")]
  4. public class UIEquipmentSlot : UIItemSlot
  5. {
  6. protected override InvGameItem observedItem
  7. {
  8. get
  9. {
  10. return (!(this.equipment != null)) ? null : this.equipment.GetItem(this.slot);
  11. }
  12. }
  13. protected override InvGameItem Replace(InvGameItem item)
  14. {
  15. return (!(this.equipment != null)) ? item : this.equipment.Replace(this.slot, item);
  16. }
  17. public InvEquipment equipment;
  18. public InvBaseItem.Slot slot;
  19. }