Ejemplo n.º 1
0
        public override void Redraw(float currentTime, float elapsedTime)
        {
            // selected vehicle (user can mouse click to select another)
            IVehicle selected = Demo.SelectedVehicle;

            // vehicle nearest mouse (to be highlighted)
            IVehicle nearMouse = Demo.VehicleNearestToMouse();

            // update camera
            Demo.UpdateCamera(elapsedTime, selected);

            // draw "ground plane"
            Demo.GridUtility(selected.Position);

            // draw each vehicles
            foreach (MpBase mp in _allMp)
            {
                mp.Draw();
            }

            // highlight vehicle nearest mouse
            Demo.HighlightVehicleUtility(nearMouse);
            Demo.CircleHighlightVehicleUtility(selected);
        }
Ejemplo n.º 2
0
        public override void Redraw(float currentTime, float elapsedTime)
        {
            // selected vehicle (user can mouse click to select another)
            IVehicle selected = Demo.SelectedVehicle;

            // vehicle nearest mouse (to be highlighted)
            IVehicle nearMouse = null;            //Demo.vehicleNearestToMouse ();

            // update camera
            Demo.UpdateCamera(currentTime, elapsedTime, selected);

            // draw "ground plane"
            Demo.GridUtility(selected.Position);

            // draw each vehicles
            for (int i = 0; i < allMP.Count; i++)
            {
                allMP[i].Draw();
            }

            // highlight vehicle nearest mouse
            Demo.HighlightVehicleUtility(nearMouse);
            Demo.CircleHighlightVehicleUtility(selected);
        }