public FixedOffsetCameraControlScheme(Entity entity, Camera camera, DemosGame game) : base(camera, game) { Entity = entity; UseCameraSmoothing = true; CameraOffset = new Vector3(0, 0.7f, 0); }
/// <summary> /// The main entry point for the application. /// </summary> private static void Main(string[] args) { using (var game = new DemosGame()) { game.Run(); } }
public FixedOffsetCameraControlScheme(Entity entity, Camera camera, DemosGame game) : base(camera, game) { Entity = entity; UseCameraSmoothing = true; CameraOffset = new Vector3(0, 0.7m, 0); }
public CharacterCameraControlScheme(CharacterController character, Camera camera, DemosGame game) : base(camera, game) { Character = character; UseCameraSmoothing = true; StandingCameraOffset = 0.7f; CrouchingCameraOffset = 0.4f; }
/// <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; }
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; }
/// <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; }
protected CameraControlScheme(Camera camera, DemosGame game) { Camera = camera; Game = game; }
public FreeCameraControlScheme(float speed, Camera camera, DemosGame game) : base(camera, game) { Speed = speed; }
/// <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; }