Example #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();
 }
Example #2
0
 static void Main(string[] args)
 {
     using (RacingGame game = new RacingGame())
     {
         game.Run();
     }
 }
Example #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);
 }
Example #4
0
        public FreeCamera(RacingGame raceGame, Vector3 position, Vector3 target, Vector3 orientation)
            : base(raceGame, position, target, orientation)
        {
            Yaw = 0;
            Pitch = 0;

            CameraRotation = Matrix.Identity;
        }
Example #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;
 }
Example #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;
 }
Example #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();
 }
Example #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;
 }
Example #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;
 }
Example #10
0
 public Track(RacingGame game, Terrain ground)
     : base(game)
 {
     RaceGame = game;
     Ground = ground;
 }
Example #11
0
 public SpeedDisplay(RacingGame game, string fontName)
     : base(game)
 {
     RaceGame = game;
     FontName = fontName;
 }
Example #12
0
 public ModelDisplay(RacingGame raceGame)
     : base(raceGame)
 {
     RaceGame = raceGame;
 }
Example #13
0
 public Chronometer(RacingGame game, string fontName)
     : base(game)
 {
     RaceGame = game;
     FontName = fontName;
 }
Example #14
0
 public AccelerationDisplay(RacingGame game, string fontName)
     : base(game)
 {
     RaceGame = game;
     FontName = fontName;
 }
Example #15
0
 public HUD(RacingGame game)
     : base(game)
 {
     RaceGame = game;
 }