示例#1
0
 public void show()
 {
     if (!initialized)
     {
         Initialize();
     }
     powerCircleItem.show();
     powerCircleItem.enableRaycast();
     alphabetItem.show();
     alphabetItem.enableRaycast();
     progressItem.show();
     progressItem.enableRaycast();
     backpackItem.show();
     backpackItem.enableRaycast();
     backItem.show();
     backItem.enableRaycast();
 }
示例#2
0
    public void notifyItemClicked(UIInventoryClickItem item, int integerId)
    {
        if (status == UIInventoryState.root)
        {
            if (item == UIInventoryClickItem.powerCircle)
            {
                DataStorage ds;
                ds = mcRef.getStorage();
                ds.storeStringValue("HeroesActivityMode", "Inventory");
                ds.storeStringValue("MainActivityMode", "Inventory");
                ds.storeStringValue("MainActivityInventoryLocation", "Root");
                ds.storeStringValue("ReturnLocation", levelRef.locationName);

                fader._wa_fadeOut(this);
                this.isWaitingForActionToComplete = true;

                clickedItem = UIInventoryClickItem.powerCircle;
            }

            if (item == UIInventoryClickItem.back)
            {
                powerCircleItem.hide();
                alphabetItem.hide();
                backItem.hide();
                backpackItem.hide();
                progressItem.hide();
                player.unblockControls();
                inventory._wa_close(this);
                this.isWaitingForActionToComplete = true;
                clickedItem = item;
            }

            if (item == UIInventoryClickItem.alphabet)
            {
                DataStorage ds;
                ds = mcRef.getStorage();
                ds.storeStringValue("MainActivityMode", "Inventory");
                ds.storeStringValue("MainActivityInventoryLocation", "Root");
                ds.storeStringValue("ReturnLocation", levelRef.locationName);

                fader._wa_fadeOut(this);
                this.isWaitingForActionToComplete = true;

                clickedItem = UIInventoryClickItem.alphabet;
            }

            if (item == UIInventoryClickItem.progress)
            {
                powerCircleItem.hide(1.0f);
                alphabetItem.hide(1.25f);
                progressItem.hide(1.50f);
                backpackItem.hide(1.75f);
                powerCircleItem.disableRaycast();
                alphabetItem.disableRaycast();
                progressItem.disableRaycast();
                backpackItem.disableRaycast();

                shadowItem.show();
                questionsItem.show();
                wellsItem.show();
                facebookItem.show();
                twitterItem.show();
                shadowItem.enableRaycast();
                questionsItem.enableRaycast();
                wellsItem.enableRaycast();
                facebookItem.enableRaycast();
                twitterItem.enableRaycast();
                shadowsText.show();
                questionsText.show();
                wellsText.show();

                status = UIInventoryState.stats;
            }

            if (item == UIInventoryClickItem.backpack)
            {
                powerCircleItem.hide(1.0f);
                alphabetItem.hide(1.0f);
                progressItem.hide(1.0f);
                backpackItem.hide(1.0f);
                backItem.hide(1.0f);
                back2Item.show();
                back2Item.enableRaycast();
                backItem.disableRaycast();
                powerCircleItem.disableRaycast();
                alphabetItem.disableRaycast();
                progressItem.disableRaycast();
                backpackItem.disableRaycast();

                for (int i = 0; i < 7; ++i)
                {
                    elementsCrystalItem [i].show();
                }
                for (int i = 0; i < 7; ++i)
                {
                    lightBridgeKeyItem [i].show();
                }
                for (int i = 0; i < 7; ++i)
                {
                    mapItem [i].show();
                }
                for (int i = 0; i < 8; ++i)
                {
                    valuesScaleItem [i].show();
                }

                worldMapItem.show();
                blueManaItem.show();
                redManaItem.show();
                blueManaText.show();
                redManaText.show();
                pillItem.show();
                pillText.show();
                worldMapItem.enableRaycast();

                backpackInventoryAnim._wm_open();


                status = UIInventoryState.items;
            }
        }

        if (status == UIInventoryState.stats)
        {
            if (item == UIInventoryClickItem.back)
            {
                powerCircleItem.show();
                alphabetItem.show();
                backpackItem.show();
                progressItem.show();
                powerCircleItem.enableRaycast();
                alphabetItem.enableRaycast();
                progressItem.enableRaycast();
                backpackItem.enableRaycast();


                shadowItem.hide(1.00f);
                questionsItem.hide(1.25f);
                wellsItem.hide(1.50f);
                facebookItem.hide(1.75f);
                twitterItem.hide(2.0f);
                shadowItem.disableRaycast();
                questionsItem.disableRaycast();
                wellsItem.disableRaycast();
                facebookItem.disableRaycast();
                twitterItem.disableRaycast();
                shadowsText.hide(1.0f);
                questionsText.hide(1.25f);
                wellsText.hide(1.5f);

                status = UIInventoryState.root;
            }
        }

        if (status == UIInventoryState.items)
        {
            if (item == UIInventoryClickItem.worldMap)
            {
                DataStorage ds;
                ds = mcRef.getStorage();
                //ds.storeIntValue ("ScaleId", integerId);
                ds.storeStringValue("MainActivityMode", "Inventory");
                ds.storeStringValue("MainActivityInventoryLocation", "Items");
                ds.storeStringValue("ReturnLocation", levelRef.locationName);

                fader._wa_fadeOut(this);
                this.isWaitingForActionToComplete = true;

                clickedItem = UIInventoryClickItem.worldMap;
            }

            if (item == UIInventoryClickItem.scale)
            {
                DataStorage ds;
                ds = mcRef.getStorage();
                ds.storeIntValue("ScaleId", integerId);
                ds.storeStringValue("MainActivityMode", "Inventory");
                ds.storeStringValue("MainActivityInventoryLocation", "Items");
                ds.storeStringValue("ReturnLocation", levelRef.locationName);

                fader._wa_fadeOut(this);
                this.isWaitingForActionToComplete = true;

                clickedItem = UIInventoryClickItem.scale;
            }

            if (item == UIInventoryClickItem.back)
            {
                backpackInventoryAnim._wm_close();

                powerCircleItem.show();
                alphabetItem.show();
                backpackItem.show();
                progressItem.show();
                backItem.show();
                backItem.enableRaycast();
                powerCircleItem.enableRaycast();
                alphabetItem.enableRaycast();
                progressItem.enableRaycast();
                backpackItem.enableRaycast();

                back2Item.hide(1.0f);
                back2Item.enableRaycast();

                for (int i = 0; i < 7; ++i)
                {
                    elementsCrystalItem [i].hide(1.06f + 0.06f * i);
                }
                for (int i = 0; i < 7; ++i)
                {
                    lightBridgeKeyItem [i].hide(1.42f + 0.06f * i);
                }
                for (int i = 0; i < 7; ++i)
                {
                    mapItem [i].hide(2.15f + 0.06f * i);
                }
                for (int i = 0; i < 8; ++i)
                {
                    valuesScaleItem [i].hide(2.75f + 0.06f * i);
                }
                blueManaItem.hide(2.0f);
                redManaItem.hide(2.06f);
                blueManaText.hide(2.03f);
                redManaText.hide(2.09f);
                pillItem.hide(2.5f);
                pillText.hide(2.5f);

                status = UIInventoryState.root;
            }
        }
    }