public class DeploySpaceMineCommand extends ShipCommand
Constructor and Description |
---|
DeploySpaceMineCommand(double delay)
Creates a command to deploy a stationary space mine.
|
DeploySpaceMineCommand(double delay,
boolean homing)
Creates a command to deploy a space mine which is either stationary or homing.
|
DeploySpaceMineCommand(double delay,
int direction,
int speed,
double duration)
Create a command to deploy a space mine which will move after the given time in a direction with some amount of speed and then explode.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
executesImmediately()
Deploy Space Mine executes immediately and has a cooldown of 2 seconds.
|
int |
getEnergyCost()
Gets the energy cost for the constructed command.
|
static int |
getInitialEnergyCost()
Gets the one-time energy cost to initiate this command.
|
java.lang.String |
getName() |
equals, getMessage, getOngoingEnergyCost, isBlocking, toString
public DeploySpaceMineCommand(double delay)
delay
- time to wait before becoming active.public DeploySpaceMineCommand(double delay, boolean homing)
delay
- time to wait before becoming active.homing
- does this mine home nearby ships.public DeploySpaceMineCommand(double delay, int direction, int speed, double duration)
delay
- time before becoming active and applying initial movementdirection
- to move in after delayspeed
- (1-5) speed factorduration
- after becoming active, how long until the mine explodespublic java.lang.String getName()
getName
in class ShipCommand
public int getEnergyCost()
public static int getInitialEnergyCost()
public static boolean executesImmediately()