예제 #1
0
    public void ChangeTutorialTo(TUTORIAL_STATE tutorial)
    {
        // SETEO EL COMIENZO DEL TUTORIAL
        if (tutorial != currentTutorial)
        {
            currentTutorial = tutorial;
            switch (tutorial)
            {
            case TUTORIAL_STATE.MOVEMENT:
                if (!movementTutorialEnd)
                {
                    tutorialIndex = 0;     //La primera linea de Movimiento
                }
                break;

            case TUTORIAL_STATE.ORB:
                tutorialIndex = 2;     //La primera linea de Orbes
                break;

            case TUTORIAL_STATE.ATTACK:
                if (!attackTutorialEnd)
                {
                    tutorialIndex = 5;     //La primera linea de Ataque
                }
                break;

            default:
                break;
            }
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     tutorialList = new List <string>();
     player       = transform.parent.GetComponent <CharacterController2D>();
     InitializeTutorials();
     currentTutorial = TUTORIAL_STATE.MOVEMENT;
     ChangeTextFacing();
     ChangeTextTo(tutorialIndex);
 }
예제 #3
0
    //----------------------------------------------------------------------
    // 更新
    //----------------------------------------------------------------------
    // @Param	none
    // @Return	none
    // @Date	2015/01/09  @Update 2015/01/09  @Author T.Takeuchi
    //----------------------------------------------------------------------
    void Update()
    {
        // Input
        if (Input.GetKeyDown(InputXBOX360.P1_XBOX_START) && this.buttonCheck[0] == false)
        {
            m_soundPlayer.PlaySE("tutorial/button_push");
            this.buttonCheck[0] = true;
        }
        if (Input.GetKeyDown(InputXBOX360.P2_XBOX_START) && this.buttonCheck[1] == false)
        {
            m_soundPlayer.PlaySE("tutorial/button_push");
            this.buttonCheck[1] = true;
        }
        if (Input.GetKeyDown(InputXBOX360.P3_XBOX_START) && this.buttonCheck[2] == false)
        {
            m_soundPlayer.PlaySE("tutorial/button_push");
            this.buttonCheck[2] = true;
        }
        if (Input.GetKeyDown(InputXBOX360.P4_XBOX_START) && this.buttonCheck[3] == false)
        {
            m_soundPlayer.PlaySE("tutorial/button_push");
            this.buttonCheck[3] = true;
        }
        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            m_soundPlayer.PlaySE("tutorial/button_push");
            this.buttonCheck[0] = this.buttonCheck[1] = true;
        }
        if (Input.GetKeyDown(KeyCode.RightShift))
        {
            m_soundPlayer.PlaySE("tutorial/button_push");
            this.buttonCheck[2] = this.buttonCheck[3] = true;
        }



        // 遷移
        switch (this.state)
        {
        case TUTORIAL_STATE.WAIT:
            this.state = TUTORIAL_STATE.INIT;
            return;


        case TUTORIAL_STATE.INIT:
            InitTutorial();
            this.state = TUTORIAL_STATE.FAID_IN;
            break;


        case TUTORIAL_STATE.FAID_IN:
            if (!this.bloackOut[0].GetComponent <TweenAlpha>().enabled&&
                !this.bloackOut[1].GetComponent <TweenAlpha>().enabled&&
                !this.bloackOut[2].GetComponent <TweenAlpha>().enabled)
            {
                ReSetButtonCheck();
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.TUTORIAL0:
            if (GetButtonCheck())
            {
                m_soundPlayer.PlaySE("tutorial/tutorial_next");
                ReSetButtonCheck();
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.TUTORIAL1:
            this.guidVewer[0].SetActive(false);
            this.guidVewer[1].SetActive(true);
            this.guidVewer[1].GetComponent <UISprite>().spriteName = "user'sGuide_2";
            this.guidVewer[2].SetActive(true);
            this.guidVewer[2].GetComponent <UISprite>().spriteName = "user'sGuide_3";

            if (GetButtonCheck())
            {
                m_soundPlayer.PlaySE("tutorial/tutorial_next");
                ReSetButtonCheck();
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.TUTORIAL2:
            this.guidVewer[0].SetActive(false);
            this.guidVewer[1].SetActive(true);
            this.guidVewer[1].GetComponent <UISprite>().spriteName = "user'sGuide_4";
            this.guidVewer[2].SetActive(true);
            this.guidVewer[2].GetComponent <UISprite>().spriteName = "user'sGuide_5";

            if (GetButtonCheck())
            {
                m_soundPlayer.PlaySE("tutorial/tutorial_next");
                ReSetButtonCheck();
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.TUTORIAL3:
            this.guidVewer[0].SetActive(false);
            this.guidVewer[1].SetActive(true);
            this.guidVewer[1].GetComponent <UISprite>().spriteName = "Instruction06";
            this.guidVewer[2].SetActive(true);
            this.guidVewer[2].GetComponent <UISprite>().spriteName = "Instruction07";

            for (int i = 0; i < 4; i++)
            {
                player[i].GetComponent <CPlayer>().m_gauge.m_gauge = 210;
            }

            if (GetButtonCheck())
            {
                m_soundPlayer.PlaySE("tutorial/tutorial_next");
                ReSetButtonCheck();
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.TUTORIAL4:
            this.guidVewer[0].SetActive(true);
            this.guidVewer[0].GetComponent <UISprite>().spriteName = "Instruction08";
            this.guidVewer[1].SetActive(false);
            this.guidVewer[2].SetActive(false);

            for (int i = 0; i < 4; i++)
            {
                player[i].GetComponent <CPlayer>().m_gauge.m_gauge = 210;
            }

            if (GetButtonCheck())
            {
                ReSetButtonCheck();
                m_soundPlayer.PlaySE("tutorial/tutorial_next");
                for (int i = 0; i < 3; i++)
                {
                    this.bloackOut[i].GetComponent <TweenAlpha>().Play(false);
                }
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.TUTORIAL5:
            this.guidVewer[0].SetActive(true);
            this.guidVewer[0].GetComponent <UISprite>().spriteName = "user'sGuide_6";
            this.guidVewer[1].SetActive(false);
            this.guidVewer[2].SetActive(false);

            for (int i = 0; i < 4; i++)
            {
                player[i].GetComponent <CPlayer>().m_gauge.m_gauge = 210;
            }

            if (GetButtonCheck())
            {
                m_soundPlayer.PlaySE("tutorial/tutorial_next");
                for (int i = 0; i < 3; i++)
                {
                    this.bloackOut[i].GetComponent <TweenAlpha>().Play(false);
                }
                this.state += 1;
            }
            break;


        case TUTORIAL_STATE.FAID_OUT:
            if (!this.bloackOut[0].GetComponent <TweenAlpha>().enabled&&
                !this.bloackOut[1].GetComponent <TweenAlpha>().enabled&&
                !this.bloackOut[2].GetComponent <TweenAlpha>().enabled)
            {
                TeamData.suppoterByTeam[0] = 0;
                TeamData.suppoterByTeam[1] = 0;
                Application.LoadLevel("MainGame");
            }
            break;
        }

        ButtonDraw();
    }