Пример #1
0
        protected void CreateVerticalSquares()
        {
            GameObject squarePrefab = GUIManager.Get.InventorySquareCurrencyLarge;

            BronzeSquare     = InstantiateSquare(squarePrefab, WICurrencyType.A_Bronze, new Vector3(40f, 75f, 0f));
            SilverSquare     = InstantiateSquare(squarePrefab, WICurrencyType.B_Silver, new Vector3(40f, -25f, 0f));
            WarlockSquare    = InstantiateSquare(squarePrefab, WICurrencyType.E_Warlock, new Vector3(40f, -125f, 0f));
            GoldSquare       = InstantiateSquare(squarePrefab, WICurrencyType.C_Gold, new Vector3(40f, -225f, 0f));
            LumenSquare      = InstantiateSquare(squarePrefab, WICurrencyType.D_Luminite, new Vector3(40f, -325f, 0f));
            MakeChangeButton = NGUITools.AddChild(GUIManager.Get.InventoryMakeChangeButtonLarge);

            Vector3 stackLabelPosition = new Vector3(50f, 0f, -125f);

            BronzeSquare.StackNumberLabel.transform.localPosition  = stackLabelPosition;
            SilverSquare.StackNumberLabel.transform.localPosition  = stackLabelPosition;
            GoldSquare.StackNumberLabel.transform.localPosition    = stackLabelPosition;
            LumenSquare.StackNumberLabel.transform.localPosition   = stackLabelPosition;
            WarlockSquare.StackNumberLabel.transform.localPosition = stackLabelPosition;

            Vector3 labelPosition = new Vector3(-70f, 0f, -125f);

            BronzeSquare.InventoryItemName.transform.localPosition  = labelPosition;
            SilverSquare.InventoryItemName.transform.localPosition  = labelPosition;
            GoldSquare.InventoryItemName.transform.localPosition    = labelPosition;
            LumenSquare.InventoryItemName.transform.localPosition   = labelPosition;
            WarlockSquare.InventoryItemName.transform.localPosition = labelPosition;

            BronzeSquare.DetailedPrices  = true;
            SilverSquare.DetailedPrices  = true;
            GoldSquare.DetailedPrices    = true;
            LumenSquare.DetailedPrices   = true;
            WarlockSquare.DetailedPrices = true;
        }
Пример #2
0
        protected InventorySquareCurrency InstantiateSquare(GameObject prefab, WICurrencyType type, Vector3 position)
        {
            GameObject instantiatedSquareGameObject = NGUITools.AddChild(DisplayBase, prefab);

            instantiatedSquareGameObject.transform.localPosition = position;
            InventorySquareCurrency currencySquare = instantiatedSquareGameObject.GetComponent <InventorySquareCurrency> ();

            currencySquare.CurrencyType   = type;
            currencySquare.CurrencyAmount = 0;
            Squares.Add(currencySquare);
            return(currencySquare);
        }
Пример #3
0
        protected void CreateLargeTwoRows()
        {
            GameObject squarePrefab = GUIManager.Get.InventorySquareCurrencyLarge;

            BronzeSquare  = InstantiateSquare(squarePrefab, WICurrencyType.A_Bronze, new Vector3(0f, 0f, 0f));
            SilverSquare  = InstantiateSquare(squarePrefab, WICurrencyType.B_Silver, new Vector3(125f, 0f, 0f));
            GoldSquare    = InstantiateSquare(squarePrefab, WICurrencyType.C_Gold, new Vector3(250f, 0f, 0f));
            LumenSquare   = InstantiateSquare(squarePrefab, WICurrencyType.D_Luminite, new Vector3(62.5f, -125f, 0f));
            WarlockSquare = InstantiateSquare(squarePrefab, WICurrencyType.E_Warlock, new Vector3(187.5f, -125f, 0f));
            //MakeChangeButton = NGUITools.AddChild (GUIManager.Get.InventoryMakeChangeButtonLarge);
            //MakeChangeButton.GetComponent <UIButtonMessage> ().target = gameObject;
            //MakeChangeButton.transform.localPosition = new Vector3 (0f, 0f, 0f);
        }
Пример #4
0
        protected void CreateSmallTwoRowSquares()
        {
            //if (PrimaryBank) {
            MakeChangeButton = NGUITools.AddChild(gameObject, GUIManager.Get.InventoryMakeChangeButtonTiny);
            MakeChangeButton.GetComponent <UIButtonMessage> ().target = gameObject;
            MakeChangeButton.transform.localPosition = Vector3.zero;
            if (PrimaryBank)
            {
                if (Party == BarterParty.Character)
                {
                    MakeChangeButton.transform.FindChild("Background").GetComponent <UISprite> ().spriteName = "MakeChangeButtonX";
                }
            }
            else
            {
                if (Party == BarterParty.Player)
                {
                    MakeChangeButton.transform.FindChild("Background").GetComponent <UISprite> ().spriteName = "MakeChangeButtonX";
                }
            }
            GameObject squarePrefab = GUIManager.Get.InventorySquareCurrencySmall;

            BronzeSquare  = InstantiateSquare(squarePrefab, WICurrencyType.A_Bronze, new Vector3(75f, 0f, 0f));
            SilverSquare  = InstantiateSquare(squarePrefab, WICurrencyType.B_Silver, new Vector3(150f, 0f, 0f));
            GoldSquare    = InstantiateSquare(squarePrefab, WICurrencyType.C_Gold, new Vector3(0f, -75f, 0f));
            LumenSquare   = InstantiateSquare(squarePrefab, WICurrencyType.D_Luminite, new Vector3(75f, -75f, 0f));
            WarlockSquare = InstantiateSquare(squarePrefab, WICurrencyType.E_Warlock, new Vector3(150f, -75f, 0f));

            /*} else {
             *      GameObject squarePrefab = GUIManager.Get.InventorySquareCurrencySmall;
             *      BronzeSquare = InstantiateSquare (squarePrefab, WICurrencyType.A_Bronze, new Vector3 (0f, 0f, 0f));
             *      SilverSquare = InstantiateSquare (squarePrefab, WICurrencyType.B_Silver, new Vector3 (75f, 0f, 0f));
             *      GoldSquare = InstantiateSquare (squarePrefab, WICurrencyType.C_Gold, new Vector3 (150f, 0f, 0f));
             *      LumenSquare = InstantiateSquare (squarePrefab, WICurrencyType.D_Luminite, new Vector3 (37.5f, -75f, 0f));
             *      WarlockSquare = InstantiateSquare (squarePrefab, WICurrencyType.E_Warlock, new Vector3 (112.5f, -75f, 0f));
             * }*/
        }