Example #1
0
        public void ForValueChange(float change)
        {
            InventoryUpdateEventArgs instruction = new InventoryUpdateEventArgs();

            instruction.totalValueChange = change;
            EventSubscriber priceUpdater = new EventSubscriber();

            valueChange += priceUpdater.onChangeRequest;
            if (valueChange != null)
            {
                valueChange(this, instruction);
            }
        }
Example #2
0
 public void onChangeRequest(object source, InventoryUpdateEventArgs e)
 {
     Inventory.TotalValue += e.totalValueChange;
 }