コード例 #1
0
        private void UpdateHeadlights(PlayerInput input)
        {
            if (input.ToggleHeadlights)
            {
                //SoundFxsManager.instance.PlayOneShot(SoundFx.UIBlip01, transform.position);
                headlights.gameObject.SetActive(!headlights.gameObject.activeSelf);
                UIUtils.BlinkUI(headlightsIndicator);
            }

            if (headlights.gameObject.activeSelf)
            {
                headlightsIndicator.color = indicatorEnabledColor;
                headlightsIndicator.text  = "HEADLIGHTS ENABLED";
            }
            else
            {
                headlightsIndicator.color = indicatorDisabledColor;
                headlightsIndicator.text  = "HEADLIGHTS DISABLED";
            }
        }
コード例 #2
0
        private void UpdateAutoLevel(PlayerInput input)
        {
            if (input.ToggleAutoLevel)
            {
                //SoundFxsManager.instance.PlayOneShot(SoundFx.UIBlip01, transform.position);
                leveler.gameObject.SetActive(!leveler.gameObject.activeSelf);
                UIUtils.BlinkUI(autoLevelIndicator);
            }

            if (leveler.gameObject.activeSelf)
            {
                autoLevelIndicator.color = indicatorEnabledColor;
                autoLevelIndicator.text  = "AUTO LEVEL ENABLED";
            }
            else
            {
                autoLevelIndicator.color = indicatorDisabledColor;
                autoLevelIndicator.text  = "AUTO LEVEL DISABLED";
            }
        }