Exemple #1
0
 void FadeIn()
 {
     FadeInChapter();
     FadeInAll();
     if (m_MainFadeInAlpha <= 0f)
     {
         if (M_Motor_Mark.INSTANCE.WalkToStartPoint() &&
             M_Motor_Mark2.INSTANCE.WalkToStartPoint())
         {
             for (int i = 0; i < m_ChapterFadeINAlpha.Length; i++)
             {
                 if (m_ChapterFadeINAlpha[i] > 0f)
                 {
                     m_ChapterFadeINAlpha[i] = 0f;
                     return;
                 }
                 if (i < m_ChapterFadeINAlpha.Length - 1)
                 {
                     Destroy(ChapterNumbers[i]);
                 }
                 else
                 {
                     Destroy(ChapterName);
                 }
                 StartWallCollider.enabled = true;
                 Destroy(StartStandPlane.gameObject);
                 CurrentGameStatus = Const.GAME_STATUS.Playing;
             }
         }
     }
 }
Exemple #2
0
 void FadeIn()
 {
     FadeInChapter();
     FadeInAll();
     if (m_MainFadeInAlpha <= 0f)
     {
         if (M_Motor_Mark.INSTANCE.WalkToStartPoint() &&
             M_Motor_Mark2.INSTANCE.WalkToStartPoint())
         {
             for (int i = 0; i < m_ChapterFadeINAlpha.Length; i++)
             {
                 if (m_ChapterFadeINAlpha[i] > 0f)
                 {
                     m_ChapterFadeINAlpha[i] = 0f;
                     return;
                 }
                 if (i < m_ChapterFadeINAlpha.Length - 1)
                 {
                     Destroy(ChapterNumbers[i]);
                 }
                 else
                 {
                     Destroy(ChapterName);
                 }
                 StartWallCollider.enabled = true;
                 Destroy(StartStandPlane.gameObject);
                 CurrentGameStatus = Const.GAME_STATUS.Playing;
             }
         }
     }
 }
Exemple #3
0
    void Reset()
    {
        GAME_PAUSED                             = false;

        ChapterNumbers                          = new GameObject[3];
        ChapterNumbers[0]                       = GameObject.Find("ChapterDot") as GameObject;              //the dot
        ChapterNumbers[1]                       = GameObject.Find("ChapterNumber0") as GameObject;          //the number1
        ChapterNumbers[2]                       = GameObject.Find("ChapterNumber1") as GameObject;          //the number2
        ChapterName                             = GameObject.Find("ChapterName") as GameObject;

        ChapterNumbers[0].transform.position    = new Vector3(-20, 25, -190);
        ChapterNumbers[1].transform.position    = new Vector3(-40, 25, -190);
        ChapterNumbers[2].transform.position    = new Vector3(-30, 25, -190);
        ChapterName.transform.position          = new Vector3(30, 25, -191);

        StartPointForMark                       = new GameObject();
        StartPointForMark2                      = new GameObject();
        StartPointForMark.name                  = "StartPointForMark";
        StartPointForMark2.name                 = "StartPointForMark2";
        StartPointForMark.transform.position    = new Vector3(-30, 0, 0);
        StartPointForMark2.transform.position   = new Vector3(-35, 0, 0);

        M_Controller_Mark.MARK_CHARCONTROLLER.transform.position    = m_OriginStartPosForMark;
        M_Controller_Mark2.MARK2_CHARCONTROLLER.transform.position  = m_OriginStartPosForMark2;

        StartWallCollider                       = GameObject.Find("LeftFloor").GetComponent<BoxCollider>();
        StartWallCollider.enabled               = false;

        StartStandPlane                         = GameObject.Find("StartStandPlane").GetComponent<BoxCollider>();
        StartStandPlane.enabled                 = true;

        EndPointForMarks                        = new GameObject();
        EndPointForMarks.name                   = "EndPointFormarks";
        EndPointForMarks.transform.position     = new Vector3(52.5f, 0.0f, 0.0f);

        EndWallCollider                         = GameObject.Find("RightFloor").GetComponent<BoxCollider>();
        EndWallCollider.enabled                 = true;

        EndStandPlane                           = GameObject.Find("EndStandPlane").GetComponent<BoxCollider>();
        EndStandPlane.enabled                   = false;

        GUIMain                                 = GameObject.Find("____GUI") as GameObject;

        ClearGUIDesiredPos                      = new Vector3[3];
        GUIAssets                               = new Transform[3];

        foreach (Transform child in GUIMain.transform)
        {
            if (child.name == "Mark2GUI")
            {
                GUIAssets[0] = child;
            }
            if (child.name == "MarkGUI")
            {
                GUIAssets[1] = child;
            }
            if (child.name == "PlayerSwitcher")
            {
                GUIAssets[2] = child;
            }
        }

        ClearGUIDesiredPos[0] = GUIAssets[0].position + Vector3.right * 100.0f;
        ClearGUIDesiredPos[1] = GUIAssets[1].position + Vector3.left * 100.0f;
        ClearGUIDesiredPos[2] = GUIAssets[2].position + Vector3.up * 100.0f;

        GUIKeys             = new GameObject[3];
        for (int i = 0; i < GUIKeys.Length; i++)
        {
            GUIKeys[i]      = GameObject.Find("GUI_Key" + (i + 1).ToString()) as GameObject;
        }
        INSTANCE            = this;
        KeyGet              = 0;
        FadePlaneMaterial   = GameObject.Find("FadePlane").renderer;
        CurrentGameStatus   = Const.GAME_STATUS.FadeIn;
    }
Exemple #4
0
    void Reset()
    {
        GAME_PAUSED = false;

        ChapterNumbers    = new GameObject[3];
        ChapterNumbers[0] = GameObject.Find("ChapterDot") as GameObject;                                    //the dot
        ChapterNumbers[1] = GameObject.Find("ChapterNumber0") as GameObject;                                //the number1
        ChapterNumbers[2] = GameObject.Find("ChapterNumber1") as GameObject;                                //the number2
        ChapterName       = GameObject.Find("ChapterName") as GameObject;

        ChapterNumbers[0].transform.position = new Vector3(-20, 25, -190);
        ChapterNumbers[1].transform.position = new Vector3(-40, 25, -190);
        ChapterNumbers[2].transform.position = new Vector3(-30, 25, -190);
        ChapterName.transform.position       = new Vector3(30, 25, -191);

        StartPointForMark       = new GameObject();
        StartPointForMark2      = new GameObject();
        StartPointForMark.name  = "StartPointForMark";
        StartPointForMark2.name = "StartPointForMark2";
        StartPointForMark.transform.position  = new Vector3(-30, 0, 0);
        StartPointForMark2.transform.position = new Vector3(-35, 0, 0);

        M_Controller_Mark.MARK_CHARCONTROLLER.transform.position   = m_OriginStartPosForMark;
        M_Controller_Mark2.MARK2_CHARCONTROLLER.transform.position = m_OriginStartPosForMark2;

        StartWallCollider         = GameObject.Find("LeftFloor").GetComponent <BoxCollider>();
        StartWallCollider.enabled = false;

        StartStandPlane         = GameObject.Find("StartStandPlane").GetComponent <BoxCollider>();
        StartStandPlane.enabled = true;

        EndPointForMarks      = new GameObject();
        EndPointForMarks.name = "EndPointFormarks";
        EndPointForMarks.transform.position = new Vector3(52.5f, 0.0f, 0.0f);

        EndWallCollider         = GameObject.Find("RightFloor").GetComponent <BoxCollider>();
        EndWallCollider.enabled = true;

        EndStandPlane         = GameObject.Find("EndStandPlane").GetComponent <BoxCollider>();
        EndStandPlane.enabled = false;

        GUIMain = GameObject.Find("____GUI") as GameObject;

        ClearGUIDesiredPos = new Vector3[3];
        GUIAssets          = new Transform[3];

        foreach (Transform child in GUIMain.transform)
        {
            if (child.name == "Mark2GUI")
            {
                GUIAssets[0] = child;
            }
            if (child.name == "MarkGUI")
            {
                GUIAssets[1] = child;
            }
            if (child.name == "PlayerSwitcher")
            {
                GUIAssets[2] = child;
            }
        }

        ClearGUIDesiredPos[0] = GUIAssets[0].position + Vector3.right * 100.0f;
        ClearGUIDesiredPos[1] = GUIAssets[1].position + Vector3.left * 100.0f;
        ClearGUIDesiredPos[2] = GUIAssets[2].position + Vector3.up * 100.0f;

        GUIKeys = new GameObject[3];
        for (int i = 0; i < GUIKeys.Length; i++)
        {
            GUIKeys[i] = GameObject.Find("GUI_Key" + (i + 1).ToString()) as GameObject;
        }
        INSTANCE          = this;
        KeyGet            = 0;
        FadePlaneMaterial = GameObject.Find("FadePlane").renderer;
        CurrentGameStatus = Const.GAME_STATUS.FadeIn;
    }