public void SetInventory(IInventory inventory) { if (this.inventory != null) { this.inventory.RemoveOnChangedListener(OnInventoryChanged); } this.inventory = inventory; inventory.AddOnChangedListener(OnInventoryChanged); }
public void SetInventory(IInventory inventory) { if (this.inventory != null) { this.inventory.RemoveOnChangedListener(OnInventoryChanged); } this.inventory = inventory; inventory.AddOnChangedListener(OnInventoryChanged); }