Beispiel #1
0
 public StationaryCamera(RacingGame raceGame, Vector3 position, Vector3 target, Vector3 orientation)
     : base(raceGame)
 {
     //Initialisation des propriétés de la matrice de vue (point de vue)
     CreateViewpoint(position, target, orientation);
     CreateProjection();
 }
Beispiel #2
0
 static void Main(string[] args)
 {
     using (RacingGame game = new RacingGame())
     {
         game.Run();
     }
 }
Beispiel #3
0
 public Camera(RacingGame raceGame)
     : base(raceGame)
 {
     RaceGame = raceGame;
     float ratio = RaceGame.GraphicsDevice.Viewport.AspectRatio;
     CreateViewpoint(FOV, ratio, NEAR_PLANE_DISTANCE, FAR_PLANE_DISTANCE);
 }
Beispiel #4
0
        public FreeCamera(RacingGame raceGame, Vector3 position, Vector3 target, Vector3 orientation)
            : base(raceGame, position, target, orientation)
        {
            Yaw = 0;
            Pitch = 0;

            CameraRotation = Matrix.Identity;
        }
Beispiel #5
0
 public Odometer(RacingGame raceGame, string odometerTextureName, string needleMapTextureName, int needleMapNbColumns, int needleMapNbRows)
     : base(raceGame)
 {
     RaceGame = raceGame;
     OdometerTextureName = odometerTextureName;
     NeedleMapTextureName = needleMapTextureName;
     NeedleMapNbColumns = needleMapNbColumns;
     NeedleMapNbRows = needleMapNbRows;
 }
Beispiel #6
0
 public BaseObject(RacingGame raceGame, String modelName, Vector3 initPos, float initScale, Vector3 initRot)
     : base(raceGame)
 {
     RaceGame = raceGame;
     ModelName = modelName;
     Position = initPos;
     Scale = initScale;
     Rotation = initRot;
 }
Beispiel #7
0
 public BoxDisplayer(RacingGame raceGame, Vector3[] corners, Matrix world)
     : base(raceGame)
 {
     RaceGame = raceGame;
     Corners = corners;
     World = world;
     DefaultColor = Color.Red;
     Vertices = new VertexPositionColor[VERTICES];
     SetVertices();
 }
Beispiel #8
0
 public Vehicle(RacingGame raceGame, String modelName, Vector3 initPos, float initScale, Vector3 initRot)
     : base(raceGame, modelName, initPos, initScale, initRot)
 {
     Acceleration = 0;
     Speed = 0;
     PrevRot = 0;
     Camera = new SpringCamera(this, new Vector3(0, 400, -1000), new Vector3(0, 300, 0));
     IsCollision = false;
     MaxSpeed = MAX_SPEED_GROUND;
 }
Beispiel #9
0
 public Terrain(RacingGame raceGame, Vector3 origin, string colorMapName, string heightMapName, float terrainScale, float heightFactor)
     : base(raceGame)
 {
     RaceGame = raceGame;
     Origin = origin;
     ColorMapName = colorMapName;
     HeightMapName = heightMapName;
     TerrainScale = terrainScale;
     HeightFactor = heightFactor;
     MountainsHeightFactor = HeightFactor * MOUNTAINS_FACTOR;
 }
Beispiel #10
0
 public Track(RacingGame game, Terrain ground)
     : base(game)
 {
     RaceGame = game;
     Ground = ground;
 }
Beispiel #11
0
 public SpeedDisplay(RacingGame game, string fontName)
     : base(game)
 {
     RaceGame = game;
     FontName = fontName;
 }
Beispiel #12
0
 public ModelDisplay(RacingGame raceGame)
     : base(raceGame)
 {
     RaceGame = raceGame;
 }
Beispiel #13
0
 public Chronometer(RacingGame game, string fontName)
     : base(game)
 {
     RaceGame = game;
     FontName = fontName;
 }
Beispiel #14
0
 public AccelerationDisplay(RacingGame game, string fontName)
     : base(game)
 {
     RaceGame = game;
     FontName = fontName;
 }
Beispiel #15
0
 public HUD(RacingGame game)
     : base(game)
 {
     RaceGame = game;
 }