public void DrawLighting(SpriteBatch spriteBatch, Location location, VehicleParameters vehicleParameters) { foreach (Attachment attachment in attachmentList.Values) { attachment.DrawLighting(spriteBatch, location, vehicleParameters); } }
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); } }
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); } }
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; }
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; }