/***************************************************************
  *                            Subscene's controller
  * **************************************************************/
 private void Start()
 {
     m_ControlPanel.Initialize(
         "Room5ControlPanel", KeyCode.F, 5.0f,//Camera.main
         "^w按住^yF^w开始核心冷却程序", "^w正在启动冷却程序...");
     FadeInOutUtil.SetFadingState(5.0f, GetCameraUtil.GetCurrentCamera(), Color.black, FadeInOutUtil.FADING_STATE.FADING_IN);
 }
    public void RecvResult(ProtocolBase protocol)
    {
        //解析协议
        int           start     = 0;
        ProtocolBytes proto     = (ProtocolBytes)protocol;
        string        protoName = proto.GetString(start, ref start);
        int           isWin     = proto.GetInt(start, ref start);

        //弹出胜负面板
        Cursor.lockState = CursorLockMode.None;
        Cursor.visible   = true;
        //取消监听
        NetMgr.srvConn.msgDist.DelListener("Result", RecvResult);

        if (isWin == 0)//失败
        {
            Debug.Log("Room1 Fail");
            OperationTrident.EventSystem.Messenger.Broadcast(OperationTrident.Room1.DieHandler.PLAYER_DIE);
        }
        else//胜利
        {
            //淡出
            float fadeOutDuration = 3.0f;
            FadeInOutUtil.SetFadingState(fadeOutDuration, m_FadeOutGuiCamera, Color.black, FadeInOutUtil.FADING_STATE.FADING_OUT);
            StartCoroutine(FadeOutCoroutine(fadeOutDuration));//等多一下确定淡出完成?
        }
    }
        // Use this for initialization
        void Start()
        {
            m_CamState = CameraState.ROAMING;
            m_SpaceRubbishInitialPos        = m_SpaceRubbish.transform.position;
            m_LookingAtKunCamShakingAmp     = 0.0f;
            m_ExplosionLensFlare.brightness = 0.0f;

            //启动淡入
            FadeInOutUtil.SetFadingState(5.0f, m_CamFree, Color.black, FadeInOutUtil.FADING_STATE.FADING_IN);
        }
Esempio n. 4
0
        void Start()
        {
            subSceneController.addSubscene("enterRoom2", "room2_enter");
            subSceneController.addSubscene("room2_powerroom", "room2_power");
            subSceneController.addSubscene("room2_battle", "room2_battle");
            subSceneController.setInitialSubScene("enterRoom2");
            subSceneController.enabled = true;

            FadeInOutUtil.SetFadingState(1.0f, Camera.current, Color.black, FadeInOutUtil.FADING_STATE.FADING_IN);
        }
Esempio n. 5
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         //SceneManager.LoadScene(nextScene, LoadSceneMode.Single);
         //淡出
         float fadeOutDuration = 3.0f;
         FadeInOutUtil.SetFadingState(fadeOutDuration, m_FadeOutGuiCamera, Color.black, FadeInOutUtil.FADING_STATE.FADING_OUT);
         StartCoroutine(FadeOutCoroutine(fadeOutDuration));//等多一下确定淡出完成?
     }
 }
Esempio n. 6
0
        // Use this for initialization
        void Start()
        {
            // 场景状态初始
            state                = Room1State.Initing;
            gameObjects          = new GameObject[gameObjectCount];
            elevator.playOnAwake = false;
            //camera = GameObject.FindWithTag("MainCamera").GetComponent<Camera>();
            //enemysList = new List<GameObject>();

            FadeInOutUtil.SetFadingState(5.0f, Util.GetCamera(), Color.black, FadeInOutUtil.FADING_STATE.FADING_IN);
        }
Esempio n. 7
0
 // Use this for initialization
 void Start()
 {
     FadeInOutUtil.SetFadingState(duration, OperationTrident.Room1.Util.GetCamera(), Color.black, fadeIn ? FadeInOutUtil.FADING_STATE.FADING_IN : FadeInOutUtil.FADING_STATE.FADING_OUT);
 }
Esempio n. 8
0
 // Use this for initialization
 void Start()
 {
     FadeInOutUtil.SetFadingState(duration, Camera.current, Color.black, fadeIn?FadeInOutUtil.FADING_STATE.FADING_IN: FadeInOutUtil.FADING_STATE.FADING_OUT);
 }