|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--netwar.game.GameObject
|
+--netwar.game.Unit
|
+--netwar.game.unit.UnitDefault
Temporary Unit class. This will be removed in Iteration 2, when the real Units are created. This is a fast, durable, short range combatant. It has good armor, and uses a rapid fire weapon (which is good against low armor targets). Because of its long range, it has an extended scan range so that it can automatically approach enemies.
| Fields inherited from class netwar.game.Unit |
f, health, reserved, resF, resX, resY |
| Fields inherited from class netwar.game.GameObject |
action, firstSSMDS, frame, GameObjects, goalX, goalY, mode, myID, myPlayer, reload, target, targetSSMDS, vr, x, y |
| Constructor Summary | |
UnitDefault()
Constructor. |
|
| Method Summary | |
protected void |
animateDie()
Unit default forms by compressing horizontally while extending vertically until it becomes a line and disappears. |
protected void |
animateMake()
Unit default forms by shifting the triangles from a nearly verticle form to the standard shape. |
protected void |
animateMove()
Unit default moves by sliding. |
protected void |
animateRotateLeft()
Unit default rotates left by sliding. |
protected void |
animateRotateRight()
Unit default rotates right by sliding. |
protected int |
armor()
Unit default has an armor rating of 5 |
protected void |
createVectors()
Initialize the Point3Ds used for this Base. |
void |
draw(GameViewer v)
Unit default is drawn as two triangles. |
protected boolean |
fire()
Unit default fires a ProjectileDefault. |
int |
followRange()
Unit default pursues to a range of 3 hexes. |
protected int |
framesToDie()
Unit default spends 10 frames doing a death scene. |
protected int |
framesToMake()
Unit default requires 10 frames to be created. |
protected int |
framesToMove()
Unit default requires 5 frames to move forward one hex. |
protected int |
framesToRotate()
Unit default requires 3 frames to rotate one hex-side. |
float |
getHeight()
Unit default is 1.0 units tall. |
float |
getWidth()
Unit default is 7.0 units wide. |
protected int |
maxHealth()
Unit default has a maximum of 100 health. |
float |
scanRangeSquared()
Unit default uses a scan range of 160.0 units, or 8 hexes. |
int |
weaponDelay()
Unit default can fire every fifth frame. |
float |
weaponRangeSquared()
Unit default has a weapon range of 80.0 units, or 4 hexes. |
| Methods inherited from class netwar.game.Unit |
aim, bestDirection, confirmSubPlan, damageable, isDead, param, recieveDamage, setGoal, setGoal, setGoal, think, update |
| Methods inherited from class netwar.game.GameObject |
center, getID, getMinimapColor, getObjectWithID, getPlayer, locate, newGameObject, removeMe, scan, updateAll |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UnitDefault()
| Method Detail |
protected int framesToMove()
framesToMove in class Unitprotected int framesToRotate()
framesToRotate in class Unitprotected int framesToMake()
framesToMake in class GameObjectprotected int framesToDie()
framesToDie in class GameObjectprotected void createVectors()
GameObjectcreateVectors in class GameObjectpublic void draw(GameViewer v)
draw in class GameObjectnetwar.game.GameObjectv - The GameViewer which will display this GameObject.HexViewerprotected void animateMove()
animateMove in class Unitprotected void animateRotateLeft()
animateRotateLeft in class Unitprotected void animateRotateRight()
animateRotateRight in class Unitprotected void animateMake()
animateMake in class GameObjectprotected void animateDie()
animateDie in class GameObjectpublic float getHeight()
getHeight in class GameObjectpublic float getWidth()
getWidth in class GameObjectpublic float weaponRangeSquared()
weaponRangeSquared in class GameObjectpublic float scanRangeSquared()
scanRangeSquared in class GameObjectpublic int followRange()
followRange in class Unitpublic int weaponDelay()
weaponDelay in class GameObjectprotected boolean fire()
fire in class GameObjectnetwar.game.GameObjectprotected int maxHealth()
maxHealth in class Unitprotected int armor()
armor in class Unit
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||