All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.loki3.cyber.pawn.WeaponTurret

java.lang.Object
    |
    +----com.loki3.pa.Item
            |
            +----com.loki3.cyber.pawn.UnitClass
                    |
                    +----com.loki3.cyber.pawn.Weapon
                            |
                            +----com.loki3.cyber.pawn.WeaponTurret

public class WeaponTurret
extends Weapon
A weapon which can turn and fire


Constructor Index

 o WeaponTurret()
 

Method Index

 o fire()
Fire the weapon.
 o getCurrentAngle()
Get current angle turret is facing relative to the tank in radians counterclockwise.
 o getMaker()
object which can publicly create us
 o setParticle(Particle)
 
 o turnLeft(double)
Change direction turret is pointing in by turning left by the given angle.
 o turnRight(double)
Change direction turret is pointing in by turning right by the given angle.

Constructor Detail

 o WeaponTurret
public WeaponTurret()

Method Detail

 o getMaker
public static java.lang.Object getMaker()
          object which can publicly create us
 o setParticle
public void setParticle(com.loki3.pa.Particle particle)
Overrides:
setParticle in class com.loki3.pa.Item
 o fire
public boolean fire()
          Fire the weapon.
Returns:
false if the weapon can't be fired
Overrides:
fire in class Weapon
 o getCurrentAngle
public double getCurrentAngle()
          Get current angle turret is facing relative to the tank in radians counterclockwise. Useful for figuring out how much further to turn the turret.
 o turnLeft
public boolean turnLeft(double angle)
          Change direction turret is pointing in by turning left by the given angle. Note it may take awhile for turret to turn in given direction
Parameters:
angle - angle in radians
Returns:
turret if particle cannot turn in desired direction
 o turnRight
public boolean turnRight(double angle)
          Change direction turret is pointing in by turning right by the given angle. Note it may take awhile for turret to turn in given direction
Parameters:
angle - angle in radians
Returns:
false if turret cannot turn in desired direction

All Packages  Class Hierarchy  This Package  Previous  Next  Index