コード例 #1
0
 public void DrawLighting(SpriteBatch spriteBatch, Location location, VehicleParameters vehicleParameters)
 {
     foreach (Attachment attachment in attachmentList.Values)
     {
         attachment.DrawLighting(spriteBatch, location, vehicleParameters);
     }
 }
コード例 #2
0
        public void Draw(SpriteBatch spriteBatch, Location location, VehicleParameters vehicleParameters)
        {
            spriteBatch.Draw(sprite.texture2D, location.position, sprite.location, sprite.color, location.direction, sprite.rotationCenter, scale, SpriteEffects.None, 0);

            foreach (Attachment attachment in attachmentList.Values)
            {
                attachment.DrawAttachment(spriteBatch, location, vehicleParameters);
            }
        }
コード例 #3
0
        public void DrawGameViewBox(SpriteBatch spriteBatch, Location location, VehicleParameters vehicleParameters, float transparency)
        {
            spriteBatch.Draw(sprite.texture2D, location.position, sprite.location, sprite.color * transparency, location.direction, sprite.rotationCenter, scale, SpriteEffects.None, 0);

            foreach (Attachment attachment in attachmentList.Values)
            {
                attachment.DrawGameViewAttachment(spriteBatch, location, vehicleParameters, transparency);
            }
        }
コード例 #4
0
        public MovementAction(Location location, Point destinationPoint, VehicleParameters vehicleParameters, VehicleSpecific vehicleSpecific)
        {
            vehicleState = VehicleState.Moving;

            this.destinationPoint  = destinationPoint;
            wayPointControl        = new WaypointControl(location, vehicleParameters);
            this.vehicleParameters = vehicleParameters;
            this.vehicleSpecific   = vehicleSpecific;
            this.location          = location;
        }
コード例 #5
0
        public Location(int tileX, int tileY, VehicleParameters vehicleParameters, Sprite sprite)
        {
            this.vehicleParameters = vehicleParameters;
            this.tileX             = tileX;
            this.tileY             = tileY;
            TileLogistic tileLogistic = WorldController.world.tileGrid[tileX, tileY].tileLogistic;

            position  = new Vector2((tileX * GroundLayerController.tileSize), (tileY * GroundLayerController.tileSize)) + tileLogistic.center;
            direction = tileLogistic.GetDefaultDirectionRadian();

            Point newPoint = AngleStuff.AddPointToDirection(new Point(tileX, tileY), tileLogistic.GetDefaultDirectionMirror());

            backTileX = newPoint.X;
            backTileY = newPoint.Y;

            WorldController.world.tileGrid[backTileX, backTileY].vehicle = vehicleParameters.vehicle;
            WorldController.world.tileGrid[tileX, tileY].vehicle         = vehicleParameters.vehicle;
        }