Ejemplo n.º 1
0
        private void Start()
        {
            _menuParent = GetComponentInChildren <ToolPanel>(true) as ToolPanel;

            GGVMenuTextComponents = _menuParent.GetComponentsInChildren <TextMeshPro>(true);

            SetVisibleTextLabels(false);
            GalaxyExplorerManager.Instance.GeFadeManager.OnFadeComplete += OnFadeComplete;

            RaiseButton.SetActive(false);
            _resetButton.SetActive(false);
            _backButton.SetActive(false);

            SetMenuAvailability(false, false, false);
            ToolsVisible = false;

            // Store the x value of the local position for the back button when all menu buttons are visible
            _fullMenuVisibleBackButtonX = _backButton.transform.localPosition.x;

            // Since reset is not visible during most of the app states, regard its local position as the default back button local position
            _defaultBackButtonLocalPosition = _resetButton.transform.localPosition;

            // Since the app starts with reset button not visible, move the back button to its spot instead
            _backButton.transform.localPosition = _defaultBackButtonLocalPosition;
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            if (TransitionManager.Instance == null)
            {
                Debug.LogWarning("ToolManager: No TransitionManager was found, so the zoom tool will not properly size content - transition manager is needed to identify when new content has loaded.");
            }

            smallestZoom = TargetMinZoomSize;
            panel        = GetComponent <ToolPanel>();

            if (panel == null)
            {
                Debug.LogError("ToolManager couldn't find ToolPanel. Hiding and showing of Tools unavailable.");
            }

            toolSounds = GetComponentInChildren <ToolSounds>();

            if (toolSounds == null)
            {
                Debug.LogError("ToolManager couldn't find ToolSounds.");
            }

            if (MyAppPlatformManager.Platform == MyAppPlatformManager.PlatformId.Desktop ||
                MyAppPlatformManager.Platform == MyAppPlatformManager.PlatformId.Phone)
            {
                HideTools(true);
            }
        }
Ejemplo n.º 3
0
        private void SetVisibleTextLabels(bool isVisible)
        {
            if (GGVMenuTextComponents == null)
            {
                _menuParent = GetComponentInChildren <ToolPanel>(true) as ToolPanel;

                GGVMenuTextComponents = _menuParent.GetComponentsInChildren <TextMeshPro>(true);

                if (GGVMenuTextComponents == null)
                {
                    Debug.LogWarning("GGVMenuTextComponents not found");
                    return;
                }
            }

            foreach (TextMeshPro text in GGVMenuTextComponents)
            {
                text.enabled = isVisible;
            }
        }