コード例 #1
0
        // Update is called once per frame
        void Update()
        {
            var position = Input.mousePosition;

            position.z = Distance;

            var worldPosition = Camera.main.ScreenToWorldPoint(position);

            if (Input.GetButtonDown(TriggerName))
            {
                var rotation = Camera.main.transform.rotation;
                if (AlignToViewsphere)
                {
                    Debug.LogWarning(gameObject.name + " - PieMenu_MouseControl::Update(): AlignToViewsphere Not Implemented.");
                }

                Menu.Show(worldPosition, Camera.main.transform.forward);
            }

            if (Input.GetButtonUp(TriggerName))
            {
                Menu.Hide();
            }

            if (Menu.Visible)
            {
                Menu.UpdateCursor(worldPosition);
            }
        }
コード例 #2
0
    void LoadScene(string sceneName)
    {
        Menu.Hide();

        LoadingBg.enabled   = true;
        LoadingText.enabled = true;

        StartCoroutine(CoLoader(sceneName));
    }
コード例 #3
0
 private void TrackedController_MenuButtonUnclicked(object sender, ClickedEventArgs e)
 {
     Menu.Hide();
 }