Esempio n. 1
0
    //开始游戏
    public void GameStart(int PathIndex)
    {
        //Debug.Log("开始游戏");

        m_SceneDefineListIndex = PathIndex;

        CreateIParkourScene(IParkourControllerScriptCS.GameStatus.status_Standby, null, PathIndex);
        SettingFog();
        SetPlayerIsEnterStart();
        iParkourControllerScriptCS.Initialization(currentSelectSceneDefine, IParkourControllerScriptCS.GameStatus.status_NewGame, players);

        IniAroundCamera(GameProcessLock.Gameing);

        //iParkourControllerScriptCS.m_LookAroundCamera.StartLookAround();

        //CreateIParkourScene(IParkourControllerScriptCS.GameStatus.status_NewGame, players);
        m_GameProcess = GameProcessLock.Gameing;
        //GameRoot.gameProcessControl.ActivateProcess(typeof(GameRaceProcess));
        //iParkourControllerScriptCS.Initialization(currentSelectSceneDefine, IParkourControllerScriptCS.GameStatus.status_NewGame, players);
        Invoke("ChangePropItemActive", 0.3f);
        Invoke("ChangePropItemActive", currentSelectSceneDefine.startShowPropDelayTime);
        //当巡逻相机运行完成后才标记游戏开始
        //Invoke("SetGameIsStart", currentSelectSceneDefine.startDelayCameraTime);

        iParkourControllerScriptCS.playerXiong2.IsShowPrompt_Accelerate  = true;
        iParkourControllerScriptCS.playerXiongDa.IsShowPrompt_Accelerate = true;

        //Invoke("GameEnd", sceneDefineList[0].gameTime);
        //Debug.Log("游戏结束倒计时开始");
    }
Esempio n. 2
0
    //游戏结束
    public void GameEnd()
    {
        //Debug.Log("游戏结束");
        m_GameProcess = GameProcessLock.GameOver;
        StartStandBy();
        GameRoot.gameProcessControl.ActivateProcess(typeof(GameOverProcess));

        //iParkourControllerScriptCS.Initialization(currentSelectSceneDefine, IParkourControllerScriptCS.GameStatus.status_Standby, players);
        //Invoke("SetGameIsStart", 0.01f);
    }
Esempio n. 3
0
    //生成环绕相机
    public void IniAroundCamera(GameProcessLock gameprocess)
    {
        switch (gameprocess)
        {
        case GameProcessLock.Gameing:
            currentSelectSceneDefine.startAroundCamera = GameRoot.gameResource.LoadResource_Prefabs("CameraLookAroundStart.prefab").GetComponentInChildren <PlayerController>();
            currentSelectSceneDefine.startAroundCamera.StartLookAround();
            break;

        case GameProcessLock.GameOver:
            currentSelectSceneDefine.endAroundCamera = GameRoot.gameResource.LoadResource_Prefabs("CameraLookAroundEnd.prefab").GetComponentInChildren <PlayerController>();
            currentSelectSceneDefine.endAroundCamera.gameObject.transform.position = iParkourControllerScriptCS.gameObject.transform.position;
            currentSelectSceneDefine.endAroundCamera.StartLookAround();
            break;
        }
    }