public void OnSoldItemToVendor(InventoryItemBase item, uint amount, VendorTrigger vendor) { if (eventHandler != null) { eventHandler.OnSoldItemToVendor(item, amount, vendor); } }
public void OnBoughtItemBackFromVendor(InventoryItemBase item, uint amount, VendorTrigger vendor) { if (eventHandler != null) { eventHandler.OnBoughtItemBackFromVendor(item, amount, vendor); } }
public void ShowVendorUI() { Devdog.General.Player player = GameObject.FindGameObjectWithTag("Player").GetComponent <Devdog.General.Player>(); VendorTrigger trigger = GetComponent <VendorTrigger>(); trigger.OnTriggerUsed(player); }
public virtual void ShowDialog(Transform caller, string title, string description, int minValue, int maxValue, InventoryItemBase item, ItemBuySellDialogAction action, VendorTrigger vendor, IntValDialogCallback yesCallback, IntValDialogCallback noCallback) { // Don't call base class going directly to this.ShowDialog() inventoryItem = item; this.action = action; this.vendor = vendor; ShowDialog(caller, string.Format(string.Format(title, item.name, item.description)), string.Format(description, item.name, item.description), minValue, maxValue, yesCallback, noCallback); }
public void OnBoughtItemBackFromVendor(InventoryItemBase item, uint amount, VendorTrigger vendor) { if (onBoughtItemBackFromVendor.Count > 0) { RunEvents(onBoughtItemBackFromVendor, new plyEventArg("item", item), new plyEventArg("itemID", (int)item.ID), new plyEventArg("amount", (int)amount), new plyEventArg("vendor", vendor)); } }
public override void OnReset() { vendor = null; }
// Let's cache our vendorTrigger component public void OpenWindow(VendorTrigger vendorTrigger) { currentVendingTrigger = vendorTrigger; PopulateContents(); }
public override void OnReset() { items = null; vendor = null; }