Esempio n. 1
0
        // Use this for initialization
        void Start()
        {
            StoreController.Initialize(new MuffinRushAssets());
            handler = new ExampleEventHandler();

            // Initialization of 'ExampleLocalStoreInfo' and some example usages in ExampleEventHandler.onStoreControllerInitialized
        }
        // Use this for initialization
        void Start()
        {
            StoreController.Initialize(new MuffinRushAssets());
            handler = new ExampleEventHandler();
            ExampleLocalStoreInfo.Init();

            // some examples
            try {
                Debug.Log("start currency: " + StoreInventory.GetItemBalance("currency_muffin"));
                StoreInventory.TakeItem("currency_muffin", 50);
                Debug.Log("middle currency: " + StoreInventory.GetItemBalance("currency_muffin"));
                StoreInventory.GiveItem("currency_muffin", 4000);
                Debug.Log("end currency:" + StoreInventory.GetItemBalance("currency_muffin"));
            } catch (VirtualItemNotFoundException ex) {
                Debug.Log(ex.Message);
            }
        }
Esempio n. 3
0
        // Use this for initialization
        void Start()
        {
            handler = new ExampleEventHandler();

            StoreController.Initialize(new MuffinRushAssets());

            // Initialization of 'ExampleLocalStoreInfo' and some example usages in ExampleEventHandler.onStoreControllerInitialized
        }
Esempio n. 4
0
        // Use this for initialization
        void Start()
        {
            StoreController.Initialize(new MuffinRushAssets());
            handler = new ExampleEventHandler();
            ExampleLocalStoreInfo.Init();

            // some examples
            try {
            Debug.Log("start currency: " + StoreInventory.GetCurrencyBalance("currency_muffin"));
            Debug.Log("remove currency: " + StoreInventory.RemoveCurrencyAmount("currency_muffin",50));
            Debug.Log("middle currency: " + StoreInventory.GetCurrencyBalance("currency_muffin"));
            Debug.Log("add currency: " + StoreInventory.AddCurrencyAmount("currency_muffin",4000));
            Debug.Log("end currency:" + StoreInventory.GetCurrencyBalance("currency_muffin"));
            } catch (VirtualItemNotFoundException ex){
                Debug.Log (ex.Message);
            }
        }
Esempio n. 5
0
        // Use this for initialization
        void Start()
        {
            StoreController.Initialize(new MuffinRushAssets());
            handler = new ExampleEventHandler();
            ExampleLocalStoreInfo.Init();

            // some examples
            Debug.Log("start currency: " + StoreInventory.GetCurrencyBalance("currency_muffin"));
            Debug.Log("remove currency: " + StoreInventory.RemoveCurrencyAmount("currency_muffin",50));
            Debug.Log("middle currency: " + StoreInventory.GetCurrencyBalance("currency_muffin"));
            Debug.Log("add currency: " + StoreInventory.AddCurrencyAmount("currency_muffin",4000));
            Debug.Log("end currency:" + StoreInventory.GetCurrencyBalance("currency_muffin"));
        }