public interface MissionDefinitionAPI
Modifier and Type | Method and Description |
---|---|
void |
addAsteroidField(float x,
float y,
float angle,
float width,
float minSpeed,
float maxSpeed,
int quantity)
Add an asteroid field to the map.
|
void |
addBriefingItem(java.lang.String item)
Adds a line to the bulleted list under "Tactical Objectives" in the mission description.
|
void |
addFleetMember(FleetSide side,
FleetMemberAPI member) |
void |
addNebula(float x,
float y,
float radius)
Adds a circular nebula to the map.
|
void |
addObjective(float x,
float y,
java.lang.String type)
Add a battlefield objective to the map.
|
void |
addObjective(float x,
float y,
java.lang.String type,
BattleObjectiveAPI.Importance importance)
Deprecated.
|
void |
addPlanet(float x,
float y,
float radius,
PlanetAPI planet,
float gravity,
boolean backgroundPlanet)
Bases the look of the planet on the PlanetAPI passed in.
|
void |
addPlanet(float x,
float y,
float radius,
java.lang.String type,
float gravity)
Add a planet or star to the map.
|
void |
addPlanet(float x,
float y,
float radius,
java.lang.String type,
float gravity,
boolean backgroundPlanet)
Add a planet or star to the map.
|
void |
addPlugin(EveryFrameCombatPlugin plugin) |
void |
addRingAsteroids(float x,
float y,
float angle,
float width,
float minSpeed,
float maxSpeed,
int quantity) |
FleetMemberAPI |
addToFleet(FleetSide side,
java.lang.String variantId,
FleetMemberType type,
boolean isFlagship)
Add a ship variant to a fleet.
|
FleetMemberAPI |
addToFleet(FleetSide side,
java.lang.String variantId,
FleetMemberType type,
java.lang.String shipName,
boolean isFlagship)
Same as the other addToFleet method, except you can specify the ship's name.
|
void |
defeatOnShipLoss(java.lang.String shipName)
Indicates that losing the named ship causes immediate defeat for that side.
|
BattleCreationContext |
getContext() |
PersonAPI |
getDefaultCommander(FleetSide side) |
int |
getFleetPointCost(java.lang.String id)
Returns the fleet point cost of a fighter wing or ship variant.
|
boolean |
hasNebula() |
void |
initFleet(FleetSide side,
java.lang.String shipNamePrefix,
FleetGoal goal,
boolean useDefaultAI)
Set various parameters for a fleet.
|
void |
initFleet(FleetSide side,
java.lang.String shipNamePrefix,
FleetGoal goal,
boolean useDefaultAI,
int commandRating)
Set various parameters for a fleet.
|
void |
initFleet(FleetSide side,
java.lang.String shipNamePrefix,
FleetGoal goal,
boolean useDefaultAI,
int commandRating,
int allyCommandRating) |
void |
initMap(float minX,
float maxX,
float minY,
float maxY)
Initialize map with the given size.
|
void |
setBackgroundGlowColor(java.awt.Color backgroundGlowColor) |
void |
setBackgroundSpriteName(java.lang.String background) |
void |
setFleetTagline(FleetSide side,
java.lang.String tagline)
Set a small blurb for the fleet that shows up on the mission detail and
mission results screens to identify it.
|
void |
setHyperspaceMode(boolean hyperspaceMode)
Make the background animate the same way it does in hyperspace.
|
void |
setNebulaMapTex(java.lang.String nebulaMapTex) |
void |
setNebulaTex(java.lang.String nebulaTex) |
void |
setPlanetBgSize(float bgWidth,
float bgHeight)
Background planets at 0,0 get rendered at the center of the screen when the view is at the center of the map.
|
void initFleet(FleetSide side, java.lang.String shipNamePrefix, FleetGoal goal, boolean useDefaultAI)
side
- shipNamePrefix
- Prepended to any randomly picked ship names. "ISS", "HSS", etc.goal
- useDefaultAI
- For now, set true for side = ENEMY and false for side = PLAYER. Later, may supply custom AI.void initFleet(FleetSide side, java.lang.String shipNamePrefix, FleetGoal goal, boolean useDefaultAI, int commandRating)
side
- shipNamePrefix
- Prepended to any randomly picked ship names. "ISS", "HSS", etc.goal
- useDefaultAI
- For now, set true for side = ENEMY and false for side = PLAYER. Later, may supply custom AI.commandRating
- Added to the pool of available command points.FleetMemberAPI addToFleet(FleetSide side, java.lang.String variantId, FleetMemberType type, boolean isFlagship)
side
- variantId
- type
- isFlagship
- Set to true for the player's ship, false otherwise.FleetMemberAPI addToFleet(FleetSide side, java.lang.String variantId, FleetMemberType type, java.lang.String shipName, boolean isFlagship)
side
- variantId
- type
- shipName
- Full ship name, including prefix.isFlagship
- Set to true for the player's ship, false otherwise.void defeatOnShipLoss(java.lang.String shipName)
shipName
- void addBriefingItem(java.lang.String item)
item
- Text, with no leading dash.void setFleetTagline(FleetSide side, java.lang.String tagline)
side
- tagline
- void initMap(float minX, float maxX, float minY, float maxY)
minX
- in pixels.maxX
- in pixels.minY
- in pixels.maxY
- in pixels.void addNebula(float x, float y, float radius)
x
- y
- radius
- in pixels.@Deprecated void addObjective(float x, float y, java.lang.String type, BattleObjectiveAPI.Importance importance)
x
- y
- type
- one of "comm_relay", "nav_buoy", or "sensor_array".importance
- void addObjective(float x, float y, java.lang.String type)
x
- y
- type
- one of "comm_relay", "nav_buoy", or "sensor_array".void addPlanet(float x, float y, float radius, java.lang.String type, float gravity)
x
- y
- radius
- type
- available types are defined in data/config/planets.jsongravity
- Equal to maximum speed boost the planet provides to nearby ships.void addPlanet(float x, float y, float radius, java.lang.String type, float gravity, boolean backgroundPlanet)
x
- y
- radius
- type
- available types are defined in data/config/planets.jsongravity
- Equal to maximum speed boost the planet provides to nearby ships.backgroundPlanet
- If true, planet is in the "background" and doesn't exert gravity or move relative to the viewport. x and y are then screen coordinates.void addPlanet(float x, float y, float radius, PlanetAPI planet, float gravity, boolean backgroundPlanet)
x
- y
- radius
- planet
- gravity
- backgroundPlanet
- void setPlanetBgSize(float bgWidth, float bgHeight)
bgWidth
- bgHeight
- void addAsteroidField(float x, float y, float angle, float width, float minSpeed, float maxSpeed, int quantity)
x
- x coordinate of any point along the middle of the belt.y
- y coordinate of any point along the middle of the belt.angle
- direction, with 0 being to the right and 90 being up.width
- width of belt in pixels.minSpeed
- minimum speed of spawned asteroids.maxSpeed
- maximum speed of spawned asteroids.quantity
- approximate number of asteroids to keep in play as they're destroyed/move off map.void addRingAsteroids(float x, float y, float angle, float width, float minSpeed, float maxSpeed, int quantity)
int getFleetPointCost(java.lang.String id)
id
- void addPlugin(EveryFrameCombatPlugin plugin)
void setBackgroundSpriteName(java.lang.String background)
void addFleetMember(FleetSide side, FleetMemberAPI member)
void setHyperspaceMode(boolean hyperspaceMode)
hyperspaceMode
- void setNebulaTex(java.lang.String nebulaTex)
void setNebulaMapTex(java.lang.String nebulaMapTex)
void setBackgroundGlowColor(java.awt.Color backgroundGlowColor)
void initFleet(FleetSide side, java.lang.String shipNamePrefix, FleetGoal goal, boolean useDefaultAI, int commandRating, int allyCommandRating)
BattleCreationContext getContext()
boolean hasNebula()
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.