|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--netwar.game.GameObject
|
+--netwar.game.Base
Large immobile GameObject which creates Units. This object occupies seven hexes, is immobile, and has no weapon. The official victory conditions state that losing your Base means you lose the game, last player with a Base wins. Implementation of that victory condition are being delayed during this phase of development/testing.
| Fields inherited from class netwar.game.GameObject |
action, firstSSMDS, frame, GameObjects, goalX, goalY, mode, myID, myPlayer, reload, target, targetSSMDS, vr, x, y |
| Constructor Summary | |
Base(int X,
int Y)
Reserves the region occupied by the base. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent actionEvent)
SCHEDULED TO BE REMOVED This is currently used to catch button presses which cause the creation of new Units. |
protected boolean |
aim()
Makes adjustments if possible (for independent turrets) and returns true if the current target is within the firing arc (though it may be out of range to fire). |
protected void |
animateDie()
Performs the calculations for one frame of animation during the death sequence. |
protected void |
animateMake()
Perform the data changes for one frame of animation while being made. |
protected void |
createVectors()
Initialize the Point3Ds used for this Base. |
boolean |
damageable()
Return true if an explosion can possibly damage this object. |
void |
draw(GameViewer v)
Draw this Base onto GameViewer v, by using v's drawing methods. |
protected int |
framesToDie()
Returns the number of frames of animation for the death sequence. |
protected int |
framesToMake()
Return the number of frames of animation for creation animation. |
float |
getHeight()
Return the height of this Base for selection box and explosion hit calculations. |
float |
getWidth()
Return the width of this Base for selection box and explosion hit calculations. |
boolean |
isDead()
Return true if the object is not a valid target for attacks nor following. |
void |
recieveDamage(int dam)
Apply damage to this object. |
void |
setGoal()
Clear the current long-term goal. |
void |
setGoal(GameObject u)
Set the current long-term goal to a GameObject. |
void |
setGoal(int gx,
int gy)
Set the current long-term goal to a location, at hex coordinate (gx, gy). |
void |
spawnUnit(int uNumber)
If the base is not already trying to make a Unit, this will cause it to begin attempting to make a unit. |
protected void |
update()
Perform operations for this time step. |
int |
weaponDelay()
Return the number of frames to wait between firing shots. |
float |
weaponRangeSquared()
Return the square of the maximum weapon range of this GameObject. |
| Methods inherited from class netwar.game.GameObject |
center, fire, getID, getMinimapColor, getObjectWithID, getPlayer, locate, newGameObject, param, removeMe, scan, scanRangeSquared, updateAll |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Base(int X,
int Y)
| Method Detail |
public void spawnUnit(int uNumber)
public void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed in interface java.awt.event.ActionListenerprotected void update()
update in class GameObjectprotected void createVectors()
createVectors in class GameObjectpublic void draw(GameViewer v)
draw in class GameObjectnetwar.game.GameObjectv - The GameViewer which will display this GameObject.HexViewerpublic float getHeight()
getHeight in class GameObjectpublic float getWidth()
getWidth in class GameObjectprotected int framesToMake()
framesToMake in class GameObjectprotected void animateMake()
animateMake in class GameObjectpublic float weaponRangeSquared()
weaponRangeSquared in class GameObjectpublic int weaponDelay()
weaponDelay in class GameObjectpublic void setGoal()
setGoal in class GameObject
public void setGoal(int gx,
int gy)
setGoal in class GameObjectgx - The x coordinate of the goal, in hex coords.gy - The y coordinate of the goal, in hex coords.public void setGoal(GameObject u)
setGoal in class GameObjectu - The GameObject which is the goal.protected boolean aim()
aim in class GameObjectprotected void animateDie()
animateDie in class GameObjectprotected int framesToDie()
framesToDie in class GameObjectpublic boolean isDead()
isDead in class GameObjectpublic boolean damageable()
damageable in class GameObjectpublic void recieveDamage(int dam)
recieveDamage in class GameObjectdam - The number of damage points to be inflicted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||