|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface World
Provides methods for manipulating the Models in the game.
Method Summary | |
---|---|
void |
clear()
|
AmmoDump |
createAmmoDump(double centerX,
double centerY)
|
Obstacle |
createObstacle(double centerX,
double centerY,
double radius,
double radiusMin,
Rectangle driftBounds)
|
Tank |
createTank(double centerX,
double centerY,
Color color)
|
void |
fireBullet(double originX,
double originY,
double heading)
Fires a Bullet from the origin. |
AmmoDump[] |
getAmmoDumps(PointXY pointXY,
AmmoDump[] ammoDumps)
Gets all active AmmoDumps that contain the point. |
PointXY |
getClosestAmmoDumpCenter(PointXY pointXY)
Gets the center of the active AmmoDump that is closest to the point. |
PointXY |
getClosestEnemyTankCenter(PointXY pointXY,
Color friendColor)
Gets the center of the closest active tank that is not of the color. |
Damageable[] |
getDamageables(Shape shape,
Damageable[] damageables)
Gets all active Damageables that overlap the shape. |
Iterator |
getImpassables(Shape shape,
Model model)
Gets all active Impassables that overlap the shape. |
Model |
getModel(PointXY pointXY,
Class[] classes,
Model model)
Gets an active Model that contains the point. |
Obstacle[] |
getObstacles()
Gets all active and inactive Obstacles in the World. |
Tank[] |
getTanks()
Gets all active and inactive Tanks in the World. |
boolean |
isBlocked(Model model)
Determines whether an active Impassable overlaps the model shape. |
boolean |
isBlocked(Shape shape,
Model model)
Determines whether an active Impassable overlaps the shape. |
boolean |
isBlockedByObstacle(Shape shape)
|
void |
prepare()
|
void |
remove(Model model)
|
void |
update(double timeDelta)
|
Methods inherited from interface com.croftsoft.apps.mars.model.WorldAccessor |
---|
getModelAccessors |
Method Detail |
---|
void clear()
AmmoDump createAmmoDump(double centerX, double centerY)
Obstacle createObstacle(double centerX, double centerY, double radius, double radiusMin, Rectangle driftBounds)
Tank createTank(double centerX, double centerY, Color color)
void remove(Model model)
void prepare()
void update(double timeDelta)
void fireBullet(double originX, double originY, double heading)
AmmoDump[] getAmmoDumps(PointXY pointXY, AmmoDump[] ammoDumps)
Obstacle[] getObstacles()
Tank[] getTanks()
PointXY getClosestAmmoDumpCenter(PointXY pointXY)
PointXY getClosestEnemyTankCenter(PointXY pointXY, Color friendColor)
Damageable[] getDamageables(Shape shape, Damageable[] damageables)
Iterator getImpassables(Shape shape, Model model)
Model getModel(PointXY pointXY, Class[] classes, Model model)
classes
- The returned Model will be an instance of one of the classes.model
- The Model to ignore, usually the one calling this method.boolean isBlocked(Model model)
boolean isBlocked(Shape shape, Model model)
model
- The model to ignore.boolean isBlockedByObstacle(Shape shape)
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |