示例#1
0
 void ToggleUI()
 {
     if (inEditing && (int.Parse(AllStoreData[currentStoreIndex].data[currIndex].price) > coinsValue))
     {
         BuyItemB.SetActive(false);
     }
     else
     {
         BuyItemB.SetActive(inEditing);
     }
     SitDownB.SetActive(false);
     ReturnB.SetActive(inEditing);
     NextItemB.SetActive(inEditing);
     PrevItemB.SetActive(inEditing);
     objectTitle.SetActive(inEditing);
     price.SetActive(inEditing);
     GoHomeB.SetActive(!inEditing);
     if (inEditing)
     {
         chatBubbleIsActive = currentChatBubble.activeSelf;
         RequestSent.SetActive(false);
         RequestRejected.SetActive(false);
         AcceptRequest.SetActive(false);
         SendRequest.SetActive(false);
         currentChatBubble.SetActive(false);
     }
     else
     {
         currentChatBubble.SetActive(chatBubbleIsActive);
     }
     ScreenshotB.SetActive(!inEditing);
     joystick.SetActive(!inEditing);
     StoreB.SetActive(!inEditing);
 }
示例#2
0
        public void SetBrowsingType(string type)
        {
            if (items[currentBrowsingType].Count > 0)
            {
                items[currentBrowsingType][currIndex].SetActive(false); // set preivous item to not active
            }
            ItemButtonBackdrops[currentBrowsingType].SetActive(false);  // remove this ui piece to main ui manager
            currentBrowsingType = type;
            ItemButtonBackdrops[currentBrowsingType].SetActive(true);
            currIndex = 0;
            if (items[currentBrowsingType].Count == 0)
            {
                NoItemsBanner.SetActive(true);
                NextItemB.SetActive(false);
                PrevItemB.SetActive(false);
                itemName.transform.parent.gameObject.SetActive(false);
                return;
            }
            else
            {
                NoItemsBanner.SetActive(false);
                NextItemB.SetActive(true);
                PrevItemB.SetActive(true);
                itemName.transform.parent.gameObject.SetActive(true);
            }
            items[currentBrowsingType][currIndex].SetActive(true); // activate current item
            currentItem = items[currentBrowsingType][currIndex];
            string fullName = currentItem.name;

            fullName = fullName.Substring(0, fullName.Length - 7);
            itemName.GetComponent <TMPro.TextMeshProUGUI>().text = fullName.Split(';')[0].Replace("-", " ");
            FitCamera();
        }
示例#3
0
 void ToggleUI()
 {
     if (inEditing && (int.Parse(storeData.data[currIndex].price) > coinsValue))
     {
         BuyItemB.SetActive(false);
     }
     else
     {
         BuyItemB.SetActive(inEditing);
     }
     ReturnB.SetActive(inEditing);
     NextItemB.SetActive(inEditing);
     PrevItemB.SetActive(inEditing);
     objectTitle.SetActive(inEditing);
     price.SetActive(inEditing);
     GoHomeB.SetActive(!inEditing);
     StartChatB.SetActive(!inEditing);
     joystick.SetActive(!inEditing);
     StoreB.SetActive(!inEditing);
 }