public void Remove(ItemData itemData, bool isMoving, int amount = -1) { if (restriction == null) { restriction = this.GetComponentInChildren <ItemContainerRestrictor>(); } if (restriction != null) { if (restriction.IsRestricted(ItemContainerRestrictor.ContainerAction.remove)) { return; } } RemoveItem(itemData, isMoving, amount); }
public void Add(ItemData itemData, int amount = -1, bool isSave = true) { if (restriction == null) { restriction = this.GetComponentInChildren <ItemContainerRestrictor>(); } if (restriction != null) { if (restriction.IsRestricted(ItemContainerRestrictor.ContainerAction.add)) { return; } } AddItem(itemData, amount, isSave); }
public ContainerAddState GetContainerAddState(ItemData itemData) { if (restriction == null) { restriction = this.GetComponentInChildren <ItemContainerRestrictor>(); } if (restriction != null) { if (restriction.IsRestricted(ItemContainerRestrictor.ContainerAction.add)) { return(new ContainerAddState(ContainerAddState.ActionState.No)); } } if (itemData.isLocked) { return(new ContainerAddState(ContainerAddState.ActionState.No)); } return(MyContainerAddState(itemData)); }
public ContainerAddState GetContainerAddState(ItemData itemData) { if (restriction == null) { restriction = this.GetComponentInChildren<ItemContainerRestrictor>(); } if (restriction != null) { if (restriction.IsRestricted(ItemContainerRestrictor.ContainerAction.add)) { return new ContainerAddState(ContainerAddState.ActionState.No); } } if (itemData.isLocked) { return new ContainerAddState(ContainerAddState.ActionState.No); } return MyContainerAddState(itemData); }
public void Remove(ItemData itemData, bool isMoving, int amount = -1) { if (restriction == null) { restriction = this.GetComponentInChildren<ItemContainerRestrictor>(); } if (restriction != null) { if (restriction.IsRestricted(ItemContainerRestrictor.ContainerAction.remove)) { return; } } RemoveItem(itemData, isMoving, amount); }
public void Add(ItemData itemData, int amount = -1, bool isSave = true) { if (restriction == null) { restriction = this.GetComponentInChildren<ItemContainerRestrictor>(); } if (restriction != null) { if (restriction.IsRestricted(ItemContainerRestrictor.ContainerAction.add)) { return; } } AddItem(itemData, amount, isSave); }