コード例 #1
0
ファイル: Program.cs プロジェクト: vetuomia/rocket
        /// <summary>
        /// Called when the mouse is moved.
        /// </summary>
        /// <param name="move">The mouse move input.</param>
        public override void OnMouseMove(MouseMove move)
        {
            const float TurnRate = 60.0f / 400.0f;

            if (Keyboard.Space)
            {
                this.player.HeadYaw += Angle.FromDegrees(move.Horizontal * TurnRate);
                this.player.HeadPitch += Angle.FromDegrees(move.Vertical * TurnRate);
            }
            else
            {
                this.player.Yaw += Angle.FromDegrees(move.Horizontal * TurnRate);
                this.player.Pitch += Angle.FromDegrees(move.Vertical * TurnRate);
            }
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: vetuomia/rocket
 /// <summary>
 /// Called when the mouse is moved.
 /// </summary>
 /// <param name="move">The mouse move input.</param>
 public virtual void OnMouseMove(MouseMove move) { }