netwar.game.projectile
Class ProjectileDefault2

java.lang.Object
  |
  +--netwar.game.Projectile
        |
        +--netwar.game.projectile.ProjectileDefault2

public class ProjectileDefault2
extends Projectile

This projectile arcs through the air. When it falls to the ground, it explodes. If it lasts out its duration, it explodes.

Author:
Group N2 - Project Netwar, Daniel Grund

Fields inherited from class netwar.game.Projectile
center, damage, enemy, life, maker, Projectiles, radiusSquared, velocity
 
Constructor Summary
ProjectileDefault2()
          Creates a new instance of ProjectileDefault2
 
Method Summary
 void draw(GameViewer v)
          Draw self on v, by drawing 3 intersecting perpendicular lines.
protected  void Explode()
          Deal damage to the target, if it is in range.
protected  boolean mustExplode()
          Projectile default2 will explode if it's life runs out while in the air (doesn't happen)
protected  void Update()
          Move forward.
 
Methods inherited from class netwar.game.Projectile
basicUpdate, DrawAll, Fizzle, newProjectile, UpdateAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectileDefault2

public ProjectileDefault2()
Creates a new instance of ProjectileDefault2
Method Detail

Explode

protected void Explode()
Deal damage to the target, if it is in range.
Overrides:
Explode in class Projectile

Update

protected void Update()
Move forward. Accelerate downward. Explode if it hits the ground.
Overrides:
Update in class Projectile

draw

public void draw(GameViewer v)
Draw self on v, by drawing 3 intersecting perpendicular lines. One line is drawn vertically. One line is drawn horizontal, in the direction of the ground-speed. The third line is perpendicular to the other two (found with cross product).
Overrides:
draw in class Projectile
Following copied from class: netwar.game.Projectile
Parameters:
v - The GameViewer seeking to display this Projectile.

mustExplode

protected boolean mustExplode()
Projectile default2 will explode if it's life runs out while in the air (doesn't happen)
Overrides:
mustExplode in class Projectile
Returns:
true