Пример #1
0
        /**********************************************************************
        *
        *
        *  PROPERTIES
        *
        *
        **********************************************************************/
        /**********************************************************************
        *
        *
        *  CONSTRUCTORS
        *
        *
        **********************************************************************/
        public GameEngine(CommonObjects commonObjects)
        {
            this.commonObjects = commonObjects;

            // Load car
            car = new Car(1000);
            //carMesh = LoadMesh(Application.StartupPath + "\\Models\\Car.x", ref carMaterials, ref carTextures);
            carMesh = Mesh.Box(commonObjects.D3DDevice, 2, 1, 1);

            // Load map
            //mapMesh = LoadMesh(Application.StartupPath + "\\Models\\Map.x", ref mapMaterials, ref mapTextures);
            mapMesh = Mesh.Box(commonObjects.D3DDevice, 40, 1, 40);

            // Init variables
            elapsedTime	= 0;

            // Set Debugtext
            debugText = new RickisDXLib.Text(commonObjects.D3DDevice, new System.Drawing.Font("Arial", 14), "Hi", 10, 10, Color.Blue);
            carDebugText = new RickisDXLib.Text(commonObjects.D3DDevice, new System.Drawing.Font("Arial", 14), "Hi", 200, 10, Color.Blue);
        }
Пример #2
0
        public void InitializeObjects()
        {
            // Prepare common objects
            commonObjects = new CommonObjects();

            commonObjects.Options	= options;
            commonObjects.D3DDevice	= d3dDevice;

            // Fix dialogs
            gameEngine = new GameEngine(commonObjects);
        }