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()); }
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>(); }
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(); } }
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); } }