|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.croftsoft.apps.mars.model.seri.SeriWorld
public final class SeriWorld
A World implementation.
| Constructor Summary | |
|---|---|
SeriWorld(Random random,
SeriAmmoDump.Shared seriAmmoDumpShared)
|
|
| Method Summary | |
|---|---|
void |
clear()
|
AmmoDump |
createAmmoDump(double centerX,
double centerY)
|
Bullet |
createBullet(double originX,
double originY,
double heading)
|
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. |
Impassable[] |
getImpassables()
|
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. |
ModelAccessor[] |
getModelAccessors(ModelAccessor[] modelAccessors)
Gets all ModelAccessors, active and inactive. |
ModelAccessor[] |
getModelAccessors(Shape shape,
ModelAccessor[] modelAccessors)
|
Model[] |
getModels()
|
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SeriWorld(Random random,
SeriAmmoDump.Shared seriAmmoDumpShared)
| Method Detail |
|---|
public void clear()
clear in interface World
public AmmoDump createAmmoDump(double centerX,
double centerY)
createAmmoDump in interface World
public Bullet createBullet(double originX,
double originY,
double heading)
public Obstacle createObstacle(double centerX,
double centerY,
double radius,
double radiusMin,
Rectangle driftBounds)
createObstacle in interface World
public Tank createTank(double centerX,
double centerY,
Color color)
createTank in interface Worldpublic void remove(Model model)
remove in interface World
public AmmoDump[] getAmmoDumps(PointXY pointXY,
AmmoDump[] ammoDumps)
World
getAmmoDumps in interface World
public Damageable[] getDamageables(Shape shape,
Damageable[] damageables)
World
getDamageables in interface Worldpublic Impassable[] getImpassables()
public Iterator getImpassables(Shape shape,
Model model)
World
getImpassables in interface Worldpublic Model[] getModels()
public ModelAccessor[] getModelAccessors(ModelAccessor[] modelAccessors)
WorldAccessor
getModelAccessors in interface WorldAccessor
public ModelAccessor[] getModelAccessors(Shape shape,
ModelAccessor[] modelAccessors)
public Obstacle[] getObstacles()
World
getObstacles in interface Worldpublic Tank[] getTanks()
World
getTanks in interface Worldpublic void prepare()
prepare in interface Worldpublic void update(double timeDelta)
update in interface World
public void fireBullet(double originX,
double originY,
double heading)
World
fireBullet in interface Worldpublic boolean isBlockedByObstacle(Shape shape)
isBlockedByObstacle in interface World
public boolean isBlocked(Shape shape,
Model model)
World
isBlocked in interface Worldmodel - The model to ignore.public boolean isBlocked(Model model)
World
isBlocked in interface Worldpublic PointXY getClosestAmmoDumpCenter(PointXY pointXY)
World
getClosestAmmoDumpCenter in interface World
public PointXY getClosestEnemyTankCenter(PointXY pointXY,
Color friendColor)
World
getClosestEnemyTankCenter in interface World
public Model getModel(PointXY pointXY,
Class[] classes,
Model model)
World
getModel in interface Worldclasses - The returned Model will be an instance of one of the classes.model - The Model to ignore, usually the one calling this method.
|
CroftSoft Javadoc | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||