-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Actions on Events
Honeycomb936 edited this page Apr 7, 2024
·
1 revision
USS offers the ability to run functions you want when a shop restocks, and/or when an item from your shop is bought. To use that, simply put the following lines after your shop instantiation:
yourshopgo.GetComponent<ItemShop>().OnRestock += yourfuncwithoutbrackets;
yourshopgo.GetComponent<ItemShop>().OnBuy += yourfuncwithoutbrackets;
You can add as many functions as you want, just repeat the same line with a different function name.