示例#1
0
        // --------------------------------------------------------------------------
        // CONSTRUCTOR
        // --------------------------------------------------------------------------
        public CircuitRenderer(NXTCircuit circuit, GraphicsDevice graphicsDevice)
        {
            this.circuit = circuit;

            tStraight = RenderTools.LoadTextureFromFile(graphicsDevice, "Data\\droit.png");
            tTurn     = RenderTools.LoadTextureFromFile(graphicsDevice, "Data\\virage.png");
            tIntersec = RenderTools.LoadTextureFromFile(graphicsDevice, "Data\\intersection.png");
        }
示例#2
0
        // Initialisation (de tout)
        protected override void Initialize()
        {
            base.Initialize();

            spriteBatch = new SpriteBatch(this.GraphicsDevice);
            background  = RenderTools.LoadTextureFromFile(this.GraphicsDevice, "Data\\damier.png");
            tOrigin     = RenderTools.LoadTextureFromFile(this.GraphicsDevice, "Data\\origine.png");
            InitializeCircuit();
        }
示例#3
0
        // --------------------------------------------------------------------------
        // METHODS
        // --------------------------------------------------------------------------

        // Initialisation (de tout)
        protected override void Initialize()
        {
            base.Initialize();

            spriteBatch = new SpriteBatch(this.GraphicsDevice);
            background  = RenderTools.LoadTextureFromFile(this.GraphicsDevice, "Data\\damier.png");
            robot       = RenderTools.LoadTextureFromFile(this.GraphicsDevice, "Data\\robot.png");
            cRend       = new CircuitRenderer(iaVehicule.Circuit, this.GraphicsDevice);
            camera      = new Camera(this.GraphicsDevice.Viewport);
            ia          = new IADijkstra(this.iaVehicule);
        }