예제 #1
0
        public uint CreateStoryScreen(uint ownerID, string type, Vector3 pos, Vector3 dir, int plotID)
        {
            MonoStoryScreen screen = this.CreateDynamicObjectEntityInstance <MonoStoryScreen>(ownerID, type, pos, dir, this.GetNextNonSyncedDynamicObjectRuntimeID());

            screen.SetupView(plotID);
            return(screen.GetRuntimeID());
        }
예제 #2
0
        public InLevelPlotPageContext(MonoStoryScreen storyScreen, int plotID, GameObject view = null)
        {
            ContextPattern pattern = new ContextPattern {
                contextName    = "InLevelPlotPageContext",
                viewPrefabPath = "UI/Menus/Page/InLevel/InLevelPlotPage"
            };

            base.config       = pattern;
            base.view         = view;
            this._storyScreen = storyScreen;
            this._plotID      = plotID;
            this._dialogList  = new List <DialogMetaData>();
        }
예제 #3
0
        private void OnOpenAnimationChange(bool openState)
        {
            if (!openState)
            {
                MonoStoryScreen dynamicObjectByRuntimeID = (MonoStoryScreen)Singleton <DynamicObjectManager> .Instance.GetDynamicObjectByRuntimeID(this._storyScreenID);

                if (dynamicObjectByRuntimeID != null)
                {
                    dynamicObjectByRuntimeID.onOpenAnimationChange = (Action <bool>)Delegate.Remove(dynamicObjectByRuntimeID.onOpenAnimationChange, new Action <bool>(this.OnOpenAnimationChange));
                }
                this.QuitStoryStateAsDefault();
            }
        }
예제 #4
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);
            }
        }