Пример #1
0
        public void ShowHUD()
        {
            if (InputMode_Text != null)
            {
                InputMode_Text.SetActive(true);
            }
            if (InputFieldObj != null)
            {
                InputFieldObj.SetActive(true);
            }
            if (BackgroundUI != null)
            {
                BackgroundUI.SetActive(true);
            }


            InputFieldObj.GetComponent <Image>().enabled      = true;
            InputFieldObj.GetComponent <InputField>().enabled = true;
            InputFieldObj.GetComponentsInChildren <Text>().ToList().ForEach(x => x.enabled = true);
            Crosshair.GetComponent <Text>().enabled = true;
            ThrowForceBar.SetActive(true);
            TargetText.GetComponent <Text>().enabled = true;
        }
Пример #2
0
        public void HideHUD()
        {
            InputMode_Text = GameObject.Find("DebugCanvasPhysics/InputModeText");
            if (InputMode_Text != null)
            {
                InputMode_Text.SetActive(false);
            }
            // InputFieldObj.SetActive(false);

            InputFieldObj.GetComponent <Image>().enabled      = false;
            InputFieldObj.GetComponent <InputField>().enabled = false;
            InputFieldObj.GetComponentsInChildren <Text>().ToList().ForEach(x => x.enabled = false);

            BackgroundUI = GameObject.Find("DebugCanvasPhysics/InputModeText_Background");
            BackgroundUI.SetActive(false);

            Crosshair     = GameObject.Find("DebugCanvasPhysics/Crosshair");
            TargetText    = GameObject.Find("DebugCanvasPhysics/TargetText");
            ThrowForceBar = GameObject.Find("DebugCanvasPhysics/ThrowForceBar");
            Crosshair.GetComponent <Text>().enabled = false;
            ThrowForceBar.SetActive(false);
            TargetText.GetComponent <Text>().enabled = false;
        }