Example #1
0
 public void OnPointerExit(PointerEventData eventData)
 {
     Debug.Log("OnPointerExit:");
     //隐藏圈圈
     m_SelectionRadial.HandleUp();
     m_SelectionRadial.Hide();
     m_GazeOver = false;
 }
Example #2
0
    private void HandleOut()
    {
        m_SelectionRadial.Hide();
        Texture nextTex1 = Resources.Load("next/next1") as Texture;

        nextMat.SetTexture("_MainTex", nextTex1);
        m_GazeOver = false;
    }
Example #3
0
 // Called when the user ends pointing to the object
 private void HandleOut()
 {
     m_GazeOver = false;
     m_SelectionRadial.Hide();
     // If the messages option is enabled, deletes the message
     if (m_MessagesEnabled)
     {
         m_Messages.text = m_DefaultText;
     }
 }
Example #4
0
        private IEnumerator StartPhase()
        {
            yield return(StartCoroutine(m_UIController.ShowIntroUI()));

            m_reticle.Show();
            m_selectionRadial.Hide();
            yield return(StartCoroutine(m_selectionSlider.WaitForBarToFill()));

            yield return(StartCoroutine(m_UIController.HideIntroUI()));
        }
Example #5
0
    private void HandleOut()
    {
        if (!isSelected)
        {
            m_SelectionRadial.HandleUp();
            m_SelectionRadial.Hide();
            m_GazeOver = false;

            gameObject.GetComponent <Renderer>().material = m_LevelBtn_Nor;
        }
    }
Example #6
0
    private IEnumerator StartPhase()
    {
        // Wait for the intro UI to fade in.
        yield return(StartCoroutine(UIController.Instance.ShowIntroUI()));

        // Show the reticle (since there is now a selection slider) and hide the radial.
        m_Reticle.Show();
        m_SelectionRadial.Hide();

        // Wait for the selection slider to finish filling.
        yield return(StartCoroutine(m_SelectionSlider.WaitForBarToFill()));

        // Wait for the intro UI to fade out.
        yield return(StartCoroutine(UIController.Instance.HideIntroUI()));
    }
Example #7
0
        private void HandleOut()
        {
            // When the user looks away from the rendering of the scene, hide the radial.
            m_SelectionRadial.Hide();

            m_GazeOver = false;
        }
Example #8
0
 void Start()
 {
     m_Reticle.Show();
     m_Radial.Hide();
     m_Buttons.SetInvisible();
     m_LoopButtons = StartCoroutine(LoopButtons());
 }
Example #9
0
    public void HandleOut(GameObject obj)
    {
        // Make sure no UI is currrently showing
        if (!UIController.Instance.Showing)
        {
            // Hide selection radial and deactivate gazeOver
            selectionRadial.Hide();

            obj.GetComponent <Gaze>().GazeOver = false;

            switch (mode)
            {
            case GazeMode.INFO:
                // Dehighlight all animals
                // Highlight(obj);
                // Get Move Script from the gazed game object then set the isMoving to TRUE;
                if (obj.GetComponent <Move>() != null)
                {
                    obj.GetComponent <Move>().isMoving = true;
                }
                break;

            case GazeMode.GAME:
                break;

            case GazeMode.MENU:
                break;

            default:
                Debug.LogError("Invalid gaze mode!");
                break;
            }
        }
    }
Example #10
0
 private void HandleOut()
 {
     m_SelectionRadial.HandleUp();
     m_SelectionRadial.Hide();
     m_GazeOver = false;
     gameObject.GetComponent <Renderer>().material = m_NormalMaterialReplay;
 }
Example #11
0
        private IEnumerator Start()
        {
            m_Reticle.Show();

            m_Radial.Hide();

            // In order, fade in the UI on how to use sliders, wait for the slider to be filled then fade out the UI.
            yield return(StartCoroutine(m_HowToUseFader.InteruptAndFadeIn()));

            yield return(StartCoroutine(m_HowToUseSlider.WaitForBarToFill()));

            yield return(StartCoroutine(m_HowToUseFader.InteruptAndFadeOut()));

            yield return(StartCoroutine(m_CameraMovement.GameStart())); //move camera to right position and start shooting the ball

            // In order, fade in the UI on confirming the use of sliders, wait for the slider to be filled, then fade out the UI.
            yield return(StartCoroutine(m_HowToUseConfirmFader.InteruptAndFadeIn()));

            while (true)
            {
                yield return(StartCoroutine(m_HowToUseConfirmSlider.WaitForBarToFill()));

                //yield return StartCoroutine(m_HowToUseConfirmFader.InteruptAndFadeOut());

                yield return(StartCoroutine(m_BallShooter.ShootBall()));
            }

            //// Fade in the final UI.
            //yield return StartCoroutine (m_ReturnFader.InteruptAndFadeIn ());
        }
Example #12
0
    //Handle the Out event
    private void HandleOut()
    {
        m_SelectionRadial.Hide();
        m_GazeOver = false;

        if (IsInfo)
        {
            foreach (GameObject obj in objects)
            {
                if (obj.GetComponent <SkinnedMeshRenderer>() == null)
                {
                    var renderer = obj.GetComponent <MeshRenderer>();
                    renderer.material = origMaterial;
                }
                else
                {
                    var renderer = obj.GetComponent <SkinnedMeshRenderer>();
                    renderer.material = origMaterial;
                }
                if (GetComponent <Move>() != null)
                {
                    GetComponent <Move>().isMoving = true;
                }
            }
        }
        else
        {
            m_Renderer.material             = origMaterial;
            m_Renderer.material.mainTexture = originalTexture;
            Hover();
        }
    }
Example #13
0
        // Use this for initialization
        void Start()
        {
            //TODO Remove it. Just for testing.
            UserData.Instance.CurrentEnvironment = Solutionario.Base.Environment.GetEnvironment("Apartment");

            m_Reticle.Show();
            m_Radial.Hide();
        }
Example #14
0
        /**
         * Fade in instructions and on start fade out instructions
         * with fading in of environments
         */
        private IEnumerator Start()
        {
            m_Reticle.Show();
            m_Radial.Hide();

            //Fade in current instructions.
            yield return(StartCoroutine(m_InstructionsFader.InteruptAndFadeIn()));
        }
    // Called when the user ends pointing to the object
    private void HandleOut()
    {
        m_GazeOver = false;

        // Sets the button color to the non highlighted color
        m_ButtonImage.color = new Color(m_ButtonImage.color.r, m_ButtonImage.color.g, m_ButtonImage.color.b);

        m_SelectionRadial.Hide();
    }
Example #16
0
    private void HandleOut()
    {
        transform.DOScale(new Vector3(0.2f, 0.2f, 0.2f), 0.5f).SetEase(Ease.InOutSine);

        // When the user looks away from the rendering of the scene, hide the radial.
        m_SelectionRadial.Hide();

        m_GazeOver = false;
    }
Example #17
0
    private IEnumerator ShowIntro()
    {
        // Wait for the intro UI to fade in.
        yield return(StartCoroutine(UIController.Instance.ShowIntroUI()));

        // Show the reticle (since there is now a selection slider) and hide the radial.
        Phylum phylum = SpawnManager.Instance.phyla[0];             // Get the phylum

        AnimalInfo.LoadAnimalInfo(phylum, isStaticAnimals);         // Loads animal info for phylum
        m_Reticle.Show();
        m_SelectionRadial.Hide();

        // Wait for the selection slider to finish filling.
        yield return(StartCoroutine(m_SelectionSlider.WaitForBarToFill()));

        // Wait for the intro UI to fade out.
        yield return(StartCoroutine(UIController.Instance.HideIntroUI()));
    }
    public IEnumerator StartPhase()
    {
        yield return(StartCoroutine(uiController.ShowIntroUI()));

        reticle.Show();
        selectionRadial.Hide();
        yield return(StartCoroutine(selectionSlider.WaitForBarToFill()));

        yield return(StartCoroutine(uiController.HideINtroUI()));
    }
Example #19
0
    private void HandleOut()
    {
        // When the user looks away from the rendering of the scene, hide the radial.
        m_SelectionRadial.Hide();
        Texture nextTex1 = Resources.Load("next/next1") as Texture;

        //nextMat.SetTexture("_MainTex", nextTex1);
        this.GetComponent <Renderer>().material.mainTexture = nextTex1;
        m_GazeOver = false;
    }
Example #20
0
 private void HandleOut()
 {
     // When the user looks away from the rendering of the scene, hide the radial.
     m_SelectionRadial.Hide();
     m_GazeOver = false;
     if (sunScript != null)
     {
         sunScript.enabled = false;
     }
 }
Example #21
0
    private void HandleOut()
    {
        // When the user looks away from the rendering of the scene, hide the radial.
        m_SelectionRadial.Hide();

        m_GazeOver = false;

        CurrentSprite = NormalSprite;
        //m_ButtonImage.sprite = CurrentSprite;
        updateSprite();
    }
Example #22
0
 private void HandleOut()
 {
     // 不是当前分类,材质恢复Normal
     if (!isSelected)
     {
         gameObject.GetComponent <Renderer>().material = m_NormalMaterial;
     }
     m_SelectionRadial.Hide();
     m_SelectionRadial.HandleUp();
     m_GazeOver = false;
 }
Example #23
0
    //Handle the Out event
    private void HandleOut()
    {
        m_SelectionRadial.Hide();
        m_GazeOver = false;

        //foreach (GameObject obj in objects)
        //{
        //    var renderer = obj.GetComponent<MeshRenderer>();
        //    renderer.material = origMaterial;
        //}
    }
Example #24
0
        private IEnumerator StartPhase()
        {
            // Make sure the Outro UI is not being shown and the intro UI is.
            StartCoroutine(m_UIController.ShowIntroUI());
            StartCoroutine(m_UIController.HideOutroUI());

            m_CameraContainer.transform.position = new Vector3(0, 0, 0);

            // To make sure the user is facing the right way show the arrows.
            m_GuiArrows.Show();

            // Turn off the fog whilst showing the intro.
            RenderSettings.fog = false;

            // Make sure the game is stopped for the flyer's health.
            m_HealthController.StopGame();

            // Since a selection slider is being used, hide the radial and show the reticle.
            m_SelectionSlider.gameObject.SetActive(true);
            m_SelectionRadial.Hide();
            m_Reticle.Show();
            m_FlyerMovementController.m_Speed = 70f;
            m_flyerPlayership.SetActive(false);



            // The user should hold Fire1 for the selection slider so turn on warnings for tapping.
            m_InputWarnings.TurnOnDoubleTapWarnings();
            m_InputWarnings.TurnOnSingleTapWarnings();

            // In order wait for the selection slider to fill, then the intro UI to hide, then the camera to fade out.
            yield return(StartCoroutine(m_SelectionSlider.WaitForBarToFill()));

            yield return(StartCoroutine(m_UIController.HideIntroUI()));

            yield return(StartCoroutine(m_CameraFade.BeginFadeOut(m_IntroOutroFadeDuration, false)));

            // Once the screen has faded out, we can hide UI elements we don't want to see anymore like the arrows and reticle.
            m_GuiArrows.Hide();
            m_Reticle.Hide();

            // Turn the fog back on so spawned objects won't appear suddenly.
            RenderSettings.fog = true;

            // The user now needs to tap to fire so turn off the warnings.
            m_InputWarnings.TurnOffDoubleTapWarnings();
            m_InputWarnings.TurnOffSingleTapWarnings();

            // Now wait for the screen to fade back in.
            yield return(StartCoroutine(m_CameraFade.BeginFadeIn(m_IntroOutroFadeDuration, false)));
        }
Example #25
0
 private void HandleOut()
 {
     //if (mpc.m_VideoControl.activeSelf)
     //{
     //    gameObject.GetComponent<Renderer>().material = m_NormalMaterialPause;
     //}
     //else
     //{
     //    gameObject.GetComponent<Renderer>().material = m_NormalMaterialPlay;
     //}
     m_SelectionRadial.HandleUp();
     m_SelectionRadial.Hide();
     m_GazeOver = false;
 }
Example #26
0
    // Use this for initialization
    IEnumerator Start()
    {
        m_Reticle.Show();

        m_Radial.Hide();

        yield return(StartCoroutine(m_HowToUseFader.InteruptAndFadeIn()));

        yield return(StartCoroutine(m_HowToUseSlider.WaitForBarToFill()));

        yield return(StartCoroutine(m_HowToUseFader.InteruptAndFadeOut()));

        SceneManager.LoadScene("Start Menu");
    }
Example #27
0
    private void HandleOut()
    {
        m_SelectionRadial.HandleUp();
        m_SelectionRadial.Hide();
        m_GazeOver = false;

        if (mpc.m_CurrentState == MEDIAPLAYER_STATE.PLAYING)
        {
            gameObject.GetComponent <Renderer>().material = m_NormalMaterialPause;
        }
        else
        {
            gameObject.GetComponent <Renderer>().material = m_NormalMaterialPlay;
        }
    }
Example #28
0
        //Handle the Out event
        private void HandleOut()
        {
            Debug.Log("Show out state");
            m_GazeOver = false;
            m_SelectionRadial.Hide();
            m_Renderer.material = m_NormalMaterial;
            // If the coroutine has been started (and thus we have a reference to it) stop it.
            if (m_FillBarRoutine != null)
            {
                StopCoroutine(m_FillBarRoutine);
            }

            // Reset the timer and bar values.
            m_Timer = 0f;
            //  SetSliderValue(0f);
        }
Example #29
0
        [SerializeField] private UIFader m_ReturnFader;                     // The final instructions are controlled using this fader.


        private IEnumerator Start()
        {
            m_Reticle.Show();

            m_Radial.Hide();

            // In order, fade in the UI on how to use sliders, wait for the slider to be filled then fade out the UI.
            yield return(StartCoroutine(m_HowToUseFader.InteruptAndFadeIn()));

            yield return(StartCoroutine(m_HowToUseSlider.WaitForBarToFill()));

            yield return(StartCoroutine(m_HowToUseFader.InteruptAndFadeOut()));

            // Fade in the final UI.
            yield return(StartCoroutine(m_ReturnFader.InteruptAndFadeIn()));
        }
Example #30
0
    IEnumerator ButtonActive()
    {
        yield return(new WaitForSeconds(timeToButton));

        button.SetActive(true);

        m_Reticle.Show();

        m_Radial.Hide();


        m_HowToUseConfirmSlider.OnBarFilled += LoadMenu;

        yield return(StartCoroutine(m_HowToUseConfirmFader.InteruptAndFadeIn()));

        yield return(StartCoroutine(m_HowToUseConfirmSlider.WaitForBarToFill()));

        yield return(StartCoroutine(m_HowToUseConfirmFader.InteruptAndFadeOut()));
    }