Ejemplo n.º 1
0
    public void Button_PreviousPage()
    {
        UIPT_PRO_SoundController.Instance.Play_SoundClick();

        if (m_CurrentPage != 0)
        {
            m_Page0.m_MoveOut.Enable  = true;
            m_Page0.m_MoveIn.Enable   = true;
            m_Page0.m_MoveIn.MoveFrom = GAui.ePosMove.LeftScreenEdge;
            m_Page0.m_MoveIn.Time     = 1.5f;
            m_Page0.m_MoveIn.Delay    = 0;
            m_Page0.Reset();                                // Reset all animations' information of before replay
            m_Page0.MoveIn(GUIAnimSystem.eGUIMove.Self);    // Play MoveIn animation
            m_Page_0_Dot.gameObject.GetComponent <Image>().color = new Color(1, 1, 0, 1);

            m_Page1.m_MoveIn.Enable  = true;
            m_Page1.m_MoveOut.Enable = true;
            m_Page1.m_MoveOut.MoveTo = GAui.ePosMove.RightScreenEdge;
            m_Page1.m_MoveOut.Time   = 1.5f;
            m_Page1.m_MoveOut.Delay  = 0;
            m_Page1.Reset();                                // Reset all animations' information of before replay
            m_Page1.MoveOut(GUIAnimSystem.eGUIMove.Self);   // Play Move Out animation
            m_Page_1_Dot.gameObject.GetComponent <Image>().color = new Color(0.4f, 0.4f, 0.4f, 0.4f);
        }

        m_CurrentPage--;
        UpdateArrowButtons();
    }
Ejemplo n.º 2
0
    // Set next move in of all buttons to new position
    IEnumerator SetButtonMove(GUIAnim.ePosMove PosMoveIn, GUIAnim.ePosMove PosMoveOut)
    {
        yield return(new WaitForSeconds(2.0f));

        // Set next MoveIn position of m_Button1 to PosMoveIn
        m_Button1.m_MoveIn.MoveFrom = PosMoveIn;
        // Reset m_Button1
        m_Button1.Reset();
        // MoveIn m_Button1
        m_Button1.MoveIn(GSui.eGUIMove.SelfAndChildren);

        // Set next MoveIn position of m_Button2 to PosMoveIn
        m_Button2.m_MoveIn.MoveFrom = PosMoveIn;
        // Reset m_Button2
        m_Button2.Reset();
        // MoveIn m_Button2
        m_Button2.MoveIn(GSui.eGUIMove.SelfAndChildren);

        // Set next MoveIn position of m_Button3 to PosMoveIn
        m_Button3.m_MoveIn.MoveFrom = PosMoveIn;
        // Reset m_Button3
        m_Button3.Reset();
        // MoveIn m_Button3
        m_Button3.MoveIn(GSui.eGUIMove.SelfAndChildren);

        // Set next MoveIn position of m_Button4 to PosMoveIn
        m_Button4.m_MoveIn.MoveFrom = PosMoveIn;
        // Reset m_Button4
        m_Button4.Reset();
        // MoveIn m_Button4
        m_Button4.MoveIn(GSui.eGUIMove.SelfAndChildren);
    }
Ejemplo n.º 3
0
        // Set next move in of all buttons to new position
        IEnumerator SetButtonMove(ePosMove PosMoveIn, ePosMove PosMoveOut)
        {
            yield return(new WaitForSeconds(2.0f));

            // Set next MoveIn position of m_Button1 to PosMoveIn
            m_Button1.m_MoveIn.MoveFrom = PosMoveIn;
            // Reset m_Button1
            m_Button1.Reset();
            // Play In-Animations of m_Button1
            m_Button1.PlayInAnims();

            // Set next MoveIn position of m_Button2 to PosMoveIn
            m_Button2.m_MoveIn.MoveFrom = PosMoveIn;
            // Reset m_Button2
            m_Button2.Reset();
            // Play In-Animations of m_Button2
            m_Button2.PlayInAnims();

            // Set next MoveIn position of m_Button3 to PosMoveIn
            m_Button3.m_MoveIn.MoveFrom = PosMoveIn;
            // Reset m_Button3
            m_Button3.Reset();
            // Play In-Animations of m_Button3
            m_Button3.PlayInAnims();

            // Set next MoveIn position of m_Button4 to PosMoveIn
            m_Button4.m_MoveIn.MoveFrom = PosMoveIn;
            // Reset m_Button4
            m_Button4.Reset();
            // Play In-Animations of m_Button4
            m_Button4.PlayInAnims();
        }
Ejemplo n.º 4
0
    IEnumerator ShowMSG(GAui pGUIANimFREE)
    {
        // Disable GraphicRaycasters of Canvas in m_Gameplay
        // http://docs.unity3d.com/Manual/script-GraphicRaycaster.html
        GSui.Instance.SetGraphicRaycasterEnable(m_Gameplay, false);

        // Creates a yield instruction to wait for a given number of seconds
        // http://docs.unity3d.com/400/Documentation/ScriptReference/WaitForSeconds.WaitForSeconds.html
        yield return(new WaitForSeconds(0.5f));

        if (pGUIANimFREE.gameObject.activeSelf == false)
        {
            pGUIANimFREE.gameObject.SetActive(true);
        }

        // Reset all animations' information of before replay
        pGUIANimFREE.Reset();

        // Play MoveIn animation
        pGUIANimFREE.MoveIn();

        // Play particles in the hierarchy of given transfrom
        GSui.Instance.PlayParticle(pGUIANimFREE.transform);

        // Creates a yield instruction to wait for a given number of seconds
        // http://docs.unity3d.com/400/Documentation/ScriptReference/WaitForSeconds.WaitForSeconds.html
        yield return(new WaitForSeconds(0.5f));

        StartCoroutine(HideMSG(pGUIANimFREE));
    }
Ejemplo n.º 5
0
        // Play In-Animations of m_Dialog4
        IEnumerator Dialog4_PlayInAnimations()
        {
            yield return(new WaitForSeconds(1.5f));

            // Reset m_Dialog4
            m_Dialog4.Reset();

            // Moves m_Dialog4 back to screen
            m_Dialog4.PlayInAnims();
        }
Ejemplo n.º 6
0
    // MoveIn m_Dialog4
    IEnumerator Dialog4_MoveIn()
    {
        yield return(new WaitForSeconds(1.5f));

        // Reset m_Dialog4
        m_Dialog4.Reset();

        // Moves m_Dialog4 back to screen
        m_Dialog4.MoveIn(GSui.eGUIMove.SelfAndChildren);
    }
Ejemplo n.º 7
0
        // ########################################
        // Move dialog functions
        // ########################################

        #region Move Dialog

        // Play In-Animations of m_Dialog by position
        IEnumerator DialogPlayInAnimations(ePosMove PosMoveIn)
        {
            yield return(new WaitForSeconds(1.5f));

            //Debug.Log("PosMoveIn="+PosMoveIn);
            switch (PosMoveIn)
            {
            // Set m_Dialog to move in from upper
            case ePosMove.UpperScreenEdge:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.UpperScreenEdge;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from left
            case ePosMove.LeftScreenEdge:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.LeftScreenEdge;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from right
            case ePosMove.RightScreenEdge:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.RightScreenEdge;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from bottom
            case ePosMove.BottomScreenEdge:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.BottomScreenEdge;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from upper left
            case ePosMove.UpperLeft:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.UpperLeft;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from upper right
            case ePosMove.UpperRight:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.UpperRight;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from bottom left
            case ePosMove.BottomLeft:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.BottomLeft;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from bottom right
            case ePosMove.BottomRight:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.BottomRight;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;

            // Set m_Dialog to move in from center
            case ePosMove.MiddleCenter:
            default:
                m_Dialog.m_MoveIn.MoveFrom = ePosMove.MiddleCenter;
                m_Dialog.m_MoveOut.MoveTo  = ePosMove.MiddleCenter;
                break;
            }

            // Reset m_Dialog
            m_Dialog.Reset();

            // Play In-Animations of m_Dialog by position
            m_Dialog.PlayInAnims();
        }
Ejemplo n.º 8
0
    // ########################################
    // Move dialog functions
    // ########################################

    #region Move Dialog

    // MoveIn m_Dialog by position
    IEnumerator DialogMoveIn(GUIAnim.ePosMove PosMoveIn)
    {
        yield return(new WaitForSeconds(1.5f));

        //Debug.Log("PosMoveIn="+PosMoveIn);
        switch (PosMoveIn)
        {
        // Set m_Dialog to move in from upper
        case GUIAnim.ePosMove.UpperScreenEdge:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.UpperScreenEdge;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from left
        case GUIAnim.ePosMove.LeftScreenEdge:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.LeftScreenEdge;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from right
        case GUIAnim.ePosMove.RightScreenEdge:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.RightScreenEdge;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from bottom
        case GUIAnim.ePosMove.BottomScreenEdge:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.BottomScreenEdge;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from upper left
        case GUIAnim.ePosMove.UpperLeft:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.UpperLeft;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from upper right
        case GUIAnim.ePosMove.UpperRight:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.UpperRight;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from bottom left
        case GUIAnim.ePosMove.BottomLeft:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.BottomLeft;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from bottom right
        case GUIAnim.ePosMove.BottomRight:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.BottomRight;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;

        // Set m_Dialog to move in from center
        case GUIAnim.ePosMove.MiddleCenter:
        default:
            m_Dialog.m_MoveIn.MoveFrom = GUIAnim.ePosMove.MiddleCenter;
            m_Dialog.m_MoveOut.MoveTo  = GUIAnim.ePosMove.MiddleCenter;
            break;
        }

        // Reset m_Dialog
        m_Dialog.Reset();

        // MoveIn m_Dialog by position
        m_Dialog.MoveIn(GSui.eGUIMove.SelfAndChildren);
    }