Пример #1
0
        IEnumerator startPageActions(GameObject instructionText, float initialDelay, onStartPageActionsCompleteCB onStartPageActionsComplete)
        {
            m_gestureSphere.transform.position = new Vector3(0.0f + m_pageScale.x / 3, 0.0f, kSphereZPos);
            Vector3 moveToPos = new Vector3((0.0f - m_pageScale.x / 3) / transform.localScale.x, 0.0f, kSphereZPos);
            Vector3 originalTextScale = instructionText.transform.localScale;

            yield return StartCoroutine(Actions.Wait(initialDelay));

            // Instruction text actions
            instructionText.transform.localScale = Vector3.zero;
            instructionText.SetActive(true);
            StartCoroutine(instructionText.transform.ScaleTo(originalTextScale, 0.75f, EaseType.CubeOut));
            yield return StartCoroutine(Actions.Wait(1.0f));

            // Sphere Actions
            m_gestureSphere.SetActive(true);

            StartCoroutine(m_gestureSphere.transform.ScaleTo(new Vector3(1.0f / transform.localScale.x, 1.0f / transform.localScale.y, 1.0f / transform.localScale.z), 0.75f, EaseType.BackOut));
            yield return StartCoroutine(Actions.Wait(1.25f));
            StartCoroutine(m_gestureSphere.transform.MoveTo(moveToPos, 1.5f, EaseType.SineInOut));
            yield return StartCoroutine(Actions.Wait(2.75f));
            StartCoroutine(m_gestureSphere.transform.ScaleTo(Vector3.zero, 0.75f, EaseType.CubeIn));
            StartCoroutine(instructionText.transform.ScaleTo(Vector3.zero, 0.75f, EaseType.CubeIn));
            yield return StartCoroutine(Actions.Wait(0.75f));

            m_gestureSphere.SetActive(false);
            instructionText.SetActive(false);
            instructionText.transform.localScale = originalTextScale;

            onStartPageActionsComplete();

            yield return 0;
        }
Пример #2
0
 public void doStartPageActions(GameObject instructionText, float initialDelay, onStartPageActionsCompleteCB onStartPageActionsComplete)
 {
     StartCoroutine(startPageActions(instructionText, initialDelay, onStartPageActionsComplete));
 }