コード例 #1
0
 public FixedOffsetCameraControlScheme(Entity entity, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Entity = entity;
     UseCameraSmoothing = true;
     CameraOffset = new Vector3(0, 0.7f, 0);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: 4669842/GameEngine
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 private static void Main(string[] args)
 {
     using (var game = new DemosGame())
     {
         game.Run();
     }
 }
コード例 #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 private static void Main(string[] args)
 {
     using (var game = new DemosGame())
     {
         game.Run();
     }
 }
コード例 #4
0
 public FixedOffsetCameraControlScheme(Entity entity, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Entity             = entity;
     UseCameraSmoothing = true;
     CameraOffset       = new Vector3(0, 0.7m, 0);
 }
コード例 #5
0
 public CharacterCameraControlScheme(CharacterController character, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Character = character;
     UseCameraSmoothing = true;
     StandingCameraOffset = 0.7f;
     CrouchingCameraOffset = 0.4f;
 }
コード例 #6
0
        /// <summary>
        /// Sets up all the information required by the chase camera.
        /// </summary>
        /// <param name="chasedEntity">Target to follow.</param>
        /// <param name="offsetFromChaseTarget">Offset from the center of the entity target to point at.</param>
        /// <param name="transformOffset">Whether or not to transform the offset with the target entity's rotation.</param>
        /// <param name="distanceToTarget">Distance from the target position to try to maintain.</param>
        /// <param name="camera">Camera controlled by the scheme.</param>
        /// <param name="game">Running game.</param>
        public ChaseCameraControlScheme(Entity chasedEntity, Vector3 offsetFromChaseTarget, bool transformOffset, float distanceToTarget, Camera camera, DemosGame game)
            : base(camera, game)
        {
            ChasedEntity = chasedEntity;
            OffsetFromChaseTarget = offsetFromChaseTarget;
            TransformOffset = transformOffset;
            DistanceToTarget = distanceToTarget;
            ChaseCameraMargin = 1;

            rayCastFilter = RayCastFilter;
        }
コード例 #7
0
 public CharacterCameraControlScheme(CharacterController character, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Character             = character;
     UseCameraSmoothing    = true;
     StandingCameraOffset  = (Fix64)0.7m;
     CrouchingCameraOffset = (Fix64)0.4m;
     ProneCameraOffset     = (Fix64)0.1m;
 }
コード例 #8
0
        /// <summary>
        /// Sets up all the information required by the chase camera.
        /// </summary>
        /// <param name="chasedEntity">Target to follow.</param>
        /// <param name="offsetFromChaseTarget">Offset from the center of the entity target to point at.</param>
        /// <param name="transformOffset">Whether or not to transform the offset with the target entity's rotation.</param>
        /// <param name="distanceToTarget">Distance from the target position to try to maintain.</param>
        /// <param name="camera">Camera controlled by the scheme.</param>
        /// <param name="game">Running game.</param>
        public ChaseCameraControlScheme(Entity chasedEntity, Vector3 offsetFromChaseTarget, bool transformOffset, Fix64 distanceToTarget, Camera camera, DemosGame game)
            : base(camera, game)
        {
            ChasedEntity          = chasedEntity;
            OffsetFromChaseTarget = offsetFromChaseTarget;
            TransformOffset       = transformOffset;
            DistanceToTarget      = distanceToTarget;
            ChaseCameraMargin     = 1;

            rayCastFilter = RayCastFilter;
        }
コード例 #9
0
 protected CameraControlScheme(Camera camera, DemosGame game)
 {
     Camera = camera;
     Game = game;
 }
コード例 #10
0
 public FreeCameraControlScheme(float speed, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Speed = speed;
 }
 protected CameraControlScheme(Camera camera, DemosGame game)
 {
     Camera = camera;
     Game   = game;
 }
コード例 #12
0
 public FreeCameraControlScheme(float speed, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Speed = speed;
 }
 public CharacterCameraControlScheme(CharacterController character, Camera camera, DemosGame game)
     : base(camera, game)
 {
     Character             = character;
     UseCameraSmoothing    = true;
     StandingCameraOffset  = 0.7f;
     CrouchingCameraOffset = 0.4f;
 }
コード例 #14
0
ファイル: Camera.cs プロジェクト: gpforde/GPBrakes
        /// <summary>
        /// Creates a camera.
        /// </summary>
        /// <param name="position">Initial position of the camera.</param>
        /// <param name="speed">Speed of the camera per second.</param>
        /// <param name="pitch">Initial pitch angle of the camera.</param>
        /// <param name="yaw">Initial yaw value of the camera.</param>
        /// <param name="projectionMatrix">Projection matrix used.</param>
        public Camera(DemosGame game, Vector3 position, float speed, float pitch, float yaw, Matrix projectionMatrix)
        {
            this.Game = game;
            Position = position;
            Speed = speed;
            Yaw = yaw;
            Pitch = pitch;
            ProjectionMatrix = projectionMatrix;

            rayCastFilter = RayCastFilter;
        }