Beispiel #1
0
 private void CheckForExit()
 {
     if (this.InputManager.Back != FezButtonState.Pressed && this.InputManager.CancelTalk != FezButtonState.Pressed && this.InputManager.GrabThrow != FezButtonState.Pressed)
     {
         return;
     }
     this.State                 = TelescopeHost.StateType.Out;
     this.Fader                 = TimeSpan.FromSeconds(0.75);
     this.DotManager.Hidden     = false;
     this.DotManager.PreventPoI = false;
 }
Beispiel #2
0
        public override void Update(GameTime gameTime)
        {
            if (this.GameState.Loading || this.GameState.Paused || (this.GameState.InMap || this.GameState.InMenuCube) || this.GameState.InFpsMode)
            {
                return;
            }
            SkyHost.Instance.RotateLayer(0, this.TelescopeAo.Rotation);
            SkyHost.Instance.RotateLayer(1, this.TelescopeAo.Rotation);
            SkyHost.Instance.RotateLayer(2, this.TelescopeAo.Rotation);
            SkyHost.Instance.RotateLayer(3, this.TelescopeAo.Rotation);
            if (this.State == TelescopeHost.StateType.Idle)
            {
                this.CheckForUp();
            }
            else if (this.State == TelescopeHost.StateType.Out)
            {
                this.Fader -= gameTime.ElapsedGameTime;
                this.Fader -= gameTime.ElapsedGameTime;
            }
            else
            {
                this.Fader += gameTime.ElapsedGameTime;
                this.CheckForExit();
            }
            if (this.Fader.TotalSeconds <= 0.75 && this.Fader.TotalSeconds >= 0.0)
            {
                return;
            }
            switch (this.State)
            {
            case TelescopeHost.StateType.In:
                this.State = TelescopeHost.StateType.VisibleWait;
                break;

            case TelescopeHost.StateType.Out:
                this.State   = TelescopeHost.StateType.Idle;
                this.Visible = false;
                this.PlayerManager.CanControl = true;
                break;
            }
        }
Beispiel #3
0
        private void CheckForUp()
        {
            if (this.GameState.Loading || this.GameState.InMap || (this.GameState.Paused || !this.CameraManager.ActionRunning) || (!this.PlayerManager.Grounded || this.InputManager.GrabThrow != FezButtonState.Pressed || this.CameraManager.Viewpoint != FezMath.AsViewpoint(FezMath.OrientationFromDirection(FezMath.AlmostClamp(Vector3.Transform(Vector3.Left, this.TelescopeAo.Rotation))))))
            {
                return;
            }
            Vector3 vector3 = Vector3.Transform(this.PlayerManager.Position - this.TelescopeAo.Position, this.TelescopeAo.Rotation);

            if ((double)Math.Abs(vector3.Z) >= 0.5 || (double)Math.Abs(vector3.Y) >= 0.5)
            {
                return;
            }
            this.Visible                  = true;
            this.State                    = TelescopeHost.StateType.In;
            this.BitTimer                 = 0.0f;
            this.MessageIndex             = -3;
            this.Fader                    = TimeSpan.Zero;
            this.NowViewing               = this.CameraManager.Viewpoint;
            this.PlayerManager.CanControl = false;
            this.PlayerManager.Action     = ActionType.ReadTurnAround;
            this.DotManager.Hidden        = true;
            this.DotManager.PreventPoI    = true;
        }
Beispiel #4
0
 private void CheckForExit()
 {
   if (this.InputManager.Back != FezButtonState.Pressed && this.InputManager.CancelTalk != FezButtonState.Pressed && this.InputManager.GrabThrow != FezButtonState.Pressed)
     return;
   this.State = TelescopeHost.StateType.Out;
   this.Fader = TimeSpan.FromSeconds(0.75);
   this.DotManager.Hidden = false;
   this.DotManager.PreventPoI = false;
 }
Beispiel #5
0
 private void CheckForUp()
 {
   if (this.GameState.Loading || this.GameState.InMap || (this.GameState.Paused || !this.CameraManager.ActionRunning) || (!this.PlayerManager.Grounded || this.InputManager.GrabThrow != FezButtonState.Pressed || this.CameraManager.Viewpoint != FezMath.AsViewpoint(FezMath.OrientationFromDirection(FezMath.AlmostClamp(Vector3.Transform(Vector3.Left, this.TelescopeAo.Rotation))))))
     return;
   Vector3 vector3 = Vector3.Transform(this.PlayerManager.Position - this.TelescopeAo.Position, this.TelescopeAo.Rotation);
   if ((double) Math.Abs(vector3.Z) >= 0.5 || (double) Math.Abs(vector3.Y) >= 0.5)
     return;
   this.Visible = true;
   this.State = TelescopeHost.StateType.In;
   this.BitTimer = 0.0f;
   this.MessageIndex = -3;
   this.Fader = TimeSpan.Zero;
   this.NowViewing = this.CameraManager.Viewpoint;
   this.PlayerManager.CanControl = false;
   this.PlayerManager.Action = ActionType.ReadTurnAround;
   this.DotManager.Hidden = true;
   this.DotManager.PreventPoI = true;
 }
Beispiel #6
0
 public override void Update(GameTime gameTime)
 {
   if (this.GameState.Loading || this.GameState.Paused || (this.GameState.InMap || this.GameState.InMenuCube) || this.GameState.InFpsMode)
     return;
   SkyHost.Instance.RotateLayer(0, this.TelescopeAo.Rotation);
   SkyHost.Instance.RotateLayer(1, this.TelescopeAo.Rotation);
   SkyHost.Instance.RotateLayer(2, this.TelescopeAo.Rotation);
   SkyHost.Instance.RotateLayer(3, this.TelescopeAo.Rotation);
   if (this.State == TelescopeHost.StateType.Idle)
     this.CheckForUp();
   else if (this.State == TelescopeHost.StateType.Out)
   {
     this.Fader -= gameTime.ElapsedGameTime;
     this.Fader -= gameTime.ElapsedGameTime;
   }
   else
   {
     this.Fader += gameTime.ElapsedGameTime;
     this.CheckForExit();
   }
   if (this.Fader.TotalSeconds <= 0.75 && this.Fader.TotalSeconds >= 0.0)
     return;
   switch (this.State)
   {
     case TelescopeHost.StateType.In:
       this.State = TelescopeHost.StateType.VisibleWait;
       break;
     case TelescopeHost.StateType.Out:
       this.State = TelescopeHost.StateType.Idle;
       this.Visible = false;
       this.PlayerManager.CanControl = true;
       break;
   }
 }