示例#1
0
        public void useCamera(string id)
        {
            bool flag = this.transUser == null;

            if (flag)
            {
                this.transUser = FightAniUserTempSC.goUser.transform;
            }
            bool flag2 = this.process == null;

            if (flag2)
            {
                this.process = new processStruct(new Action <float>(this.onUpdate), "GameCameraMgr", false, false);
            }
            this.clearCurCamera();
            GameObject gameObject = U3DAPI.U3DResLoad <GameObject>(id);
            bool       flag3      = gameObject == null;

            if (!flag3)
            {
                this.curGoCamera = UnityEngine.Object.Instantiate <GameObject>(gameObject);
                this.curGoCamera.transform.SetParent(this.transUser, false);
                this.curScCamera = this.curGoCamera.transform.FindChild("Camera").GetComponent <CameraAniTempCS>();
                bool flag4 = this.curScCamera == null;
                if (flag4)
                {
                    this.curScCamera = this.curGoCamera.transform.FindChild("Camera").gameObject.AddComponent <CameraAniTempCS>();
                }
                this.curTransCamera = this.curGoCamera.transform.FindChild("Camera");
                this.animator       = this.curGoCamera.transform.FindChild("Camera").GetComponent <Animator>();
                this.animator.speed = 1f;
                GRMap.GAME_CAMERA.SetActive(false);
                (CrossApp.singleton.getPlugin("processManager") as processManager).addProcess(this.process, false);
            }
        }
示例#2
0
        public void clearCurCamera()
        {
            bool flag = this.curGoCamera == null;

            if (!flag)
            {
                this.curScCamera.clearAllPrelab();
                GRMap.GAME_CAMERA.SetActive(true);
                UnityEngine.Object.Destroy(this.curGoCamera);
                this.curGoCamera = null;
                this.curScCamera = null;
                this.animator    = null;
                Globle.setTimeScale(1f);
            }
        }
        public void clearCurCamera()
        {
            if (curGoCamera == null)
            {
                return;
            }
            curScCamera.clearAllPrelab();
            GRMap.GAME_CAMERA.SetActive(true);
            GameObject.Destroy(curGoCamera);
            curGoCamera = null;
            curScCamera = null;
            animator    = null;

            Globle.setTimeScale(1f);
        }