Exemplo n.º 1
0
 private void Start()
 {
     Input.gyro.enabled     = GraphicsSettingData.IsEnableGyroscope();
     this._bEnable          = true;
     this._cameraSM         = base.GetComponent <MonoIslandCameraSM>();
     this.baseAttitude      = this.GetInputGyroAttitude();
     this.referenceAttitude = base.transform.rotation;
     this._gyroRot          = base.transform.rotation;
 }
Exemplo n.º 2
0
        public override void Enter()
        {
            Singleton <AvatarManager> .Instance.SetMuteAllAvatarControl(true);

            Singleton <MainUIManager> .Instance.GetInLevelUICanvas().mainPageContext.SetInLevelMainPageActive(false, false, false);

            this.avatar = Singleton <AvatarManager> .Instance.GetLocalAvatar();

            this.SetOtherAvatarsVisibility(false);
            this.avatar.PlayState("StandBy");
            this.avatar.SetLocomotionBool("IsStoryMode", true, false);
            this.anchorRadius = this.avatar.config.StoryCameraSetting.anchorRadius;
            this.yaw          = this.avatar.config.StoryCameraSetting.yaw;
            this.pitch        = this.avatar.config.StoryCameraSetting.pitch;
            this.yOffset      = this.avatar.config.StoryCameraSetting.yOffset;
            this.xOffset      = this.avatar.config.StoryCameraSetting.xOffset;
            this.fov          = this.avatar.config.StoryCameraSetting.fov;
            Vector3 axis = Vector3.Cross(this.avatar.FaceDirection, Vector3.up);

            base.cameraForward  = (Vector3)(Quaternion.AngleAxis(this.yaw, Vector3.up) * this.avatar.FaceDirection);
            base.cameraForward  = (Vector3)(Quaternion.AngleAxis(this.pitch, axis) * base.cameraForward);
            base.cameraPosition = (Vector3)(((this.avatar.XZPosition - (base.cameraForward * this.anchorRadius)) + (Vector3.up * this.yOffset)) + (axis * this.xOffset));
            base.cameraFOV      = this.fov;
            this._storyScreenID = Singleton <DynamicObjectManager> .Instance.CreateStoryScreen(this.avatar.GetRuntimeID(), "StoryScreen", this.avatar.XZPosition + this.avatar.FaceDirection, this.avatar.FaceDirection, this._currentPlotID);

            this.avatar.SetLocomotionBool("IsStoryMode", true, false);
            Singleton <LevelDesignManager> .Instance.SetMuteAvatarVoice(true);

            MonoStoryScreen dynamicObjectByRuntimeID = (MonoStoryScreen)Singleton <DynamicObjectManager> .Instance.GetDynamicObjectByRuntimeID(this._storyScreenID);

            if (dynamicObjectByRuntimeID != null)
            {
                dynamicObjectByRuntimeID.onOpenAnimationChange = (Action <bool>)Delegate.Combine(dynamicObjectByRuntimeID.onOpenAnimationChange, new Action <bool>(this.OnOpenAnimationChange));
            }
            if (this.blurDataLoaded)
            {
                Singleton <CameraManager> .Instance.GetMainCamera().SetCameraFakeDOFCustommed(this.blurEnterCurve, this.blurEnterDuration);
            }
            this._gyro         = Input.gyro;
            this._gyro.enabled = GraphicsSettingData.IsEnableGyroscope();
            this.SetAllOtherDynamicObjectsAndEfffectsVisibility(false);
            this._baseAttitude = this._gyro.attitude;
            this._baseGravity  = this._gyro.gravity;
            if (this._pauseLevel)
            {
                Singleton <LevelManager> .Instance.SetPause(true);
            }
        }
Exemplo n.º 3
0
        private void Start()
        {
            Vector3 eulerAngles = base.transform.eulerAngles;

            this.euler.x   = eulerAngles.y;
            this.euler.y   = eulerAngles.x;
            this.euler.y   = Mathf.Repeat(this.euler.y + 180f, 360f) - 180f;
            this.origEuler = this.euler;
            this.origRot   = this.targetRot = base.transform.rotation;
            if (this.target != null)
            {
                base.transform.position = this.target.position - ((Vector3)(base.transform.forward * this.Distance));
            }
            this.state = State.Idle;
            GameObject obj2 = GameObject.Find("MainMenu_SpaceShip");

            if ((this.pilot1 == null) && (obj2 != null))
            {
                this.pilot1 = obj2.transform.Find("Warship/Warship_ControlDesk01");
            }
            if ((this.pilot2 == null) && (obj2 != null))
            {
                this.pilot2 = obj2.transform.Find("Warship/Warship_ControlDesk02");
            }
            if ((this.pilot3 == null) && (obj2 != null))
            {
                this.pilot3 = obj2.transform.Find("Warship/Warship_ControlDesk03");
            }
            if (this.pilot1 != null)
            {
                this.pilotPosition1 = this.pilot1.transform.position;
            }
            if (this.pilot2 != null)
            {
                this.pilotPosition2 = this.pilot2.transform.position;
            }
            if (this.pilot3 != null)
            {
                this.pilotPosition3 = this.pilot3.transform.position;
            }
            this.PilotShakeX.preWrapMode  = WrapMode.Loop;
            this.PilotShakeX.postWrapMode = WrapMode.Loop;
            this.PilotShakeY.preWrapMode  = WrapMode.Loop;
            this.PilotShakeY.postWrapMode = WrapMode.Loop;
            Input.gyro.enabled            = GraphicsSettingData.IsEnableGyroscope();
            this.baseAttitude             = Input.gyro.attitude;
        }
Exemplo n.º 4
0
 public void Start()
 {
     this._gyro         = Input.gyro;
     this._gyro.enabled = GraphicsSettingData.IsEnableGyroscope();
 }
Exemplo n.º 5
0
 private void Start()
 {
     Input.gyro.enabled     = GraphicsSettingData.IsEnableGyroscope();
     this.baseAttitude      = Input.gyro.attitude;
     this.referenceAttitude = Quaternion.Euler(GameObject.Find("IslandCameraGroup").transform.eulerAngles.x, 0f, 0f);
 }