moagg.model.object.sprite
Class Missile
java.lang.Object
com.golden.gamedev.object.Sprite
com.golden.gamedev.object.AnimatedSprite
moagg.model.object.sprite.AbstractMoaggAnimatedSprite
moagg.model.object.sprite.Missile
- All Implemented Interfaces:
- java.io.Serializable, ControllableObject, DestroyableObject, MoaggGameObject, ShootableObject, ShootableWithWarheadObject
public class Missile
- extends AbstractMoaggAnimatedSprite
- implements MoaggGameObject, ShootableWithWarheadObject, ControllableObject, DestroyableObject
- See Also:
- Serialized Form
Fields inherited from class com.golden.gamedev.object.Sprite |
defaultCollisionShape, height, width |
Methods inherited from class com.golden.gamedev.object.AnimatedSprite |
getAnimationTimer, getFinishAnimationFrame, getFrame, getImage, getImage, getImages, getStartAnimationFrame, isAnimate, isLoopAnim, render, setAnimate, setAnimationFrame, setAnimationTimer, setFrame, setImage, setImages, setLoopAnim, updateAnimation |
Methods inherited from class com.golden.gamedev.object.Sprite |
addHorizontalSpeed, addVerticalSpeed, forceX, forceY, getBackground, getCenterX, getCenterY, getDataID, getDefaultCollisionShape, getDistance, getHeight, getHorizontalSpeed, getID, getLayer, getOldX, getOldY, getScreenX, getScreenY, getVerticalSpeed, getWidth, getX, getY, isActive, isImmutable, isOnScreen, isOnScreen, move, moveTo, moveX, moveY, render, setActive, setBackground, setDataID, setHorizontalSpeed, setID, setImmutable, setLayer, setLocation, setMovement, setSpeed, setVerticalSpeed, setX, setY, updateMovement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Missile
public Missile()
getShooter
public ShooterObject getShooter()
- Specified by:
getShooter
in interface ShootableObject
- Returns:
- The ShooterObject that shooted this projectile.
setShooter
public void setShooter(ShooterObject shooter)
getDamage
public int getDamage()
- Specified by:
getDamage
in interface ShootableObject
- Returns:
- The damage points of this projectile.
setDamage
public void setDamage(int damage)
- Specified by:
setDamage
in interface ShootableObject
- Parameters:
damage
- The new damage points to set for this projectile.
isDestroyableByProjectile
public boolean isDestroyableByProjectile()
- Specified by:
isDestroyableByProjectile
in interface ShootableObject
- Returns:
- true, if this projectile can be destroyed by other projectiles, else false.
getAngle
public double getAngle()
- Specified by:
getAngle
in interface ControllableObject
setAngle
public void setAngle(double angle)
- Specified by:
setAngle
in interface ControllableObject
isThrust
public boolean isThrust()
- Specified by:
isThrust
in interface ControllableObject
setThrust
public void setThrust(boolean thrust)
- Specified by:
setThrust
in interface ControllableObject
getThrustForce
public double getThrustForce()
- Specified by:
getThrustForce
in interface ControllableObject
setThrustForce
public void setThrustForce(double thrustForce)
- Specified by:
setThrustForce
in interface ControllableObject
getMass
public long getMass()
- Specified by:
getMass
in interface ControllableObject
setMass
public void setMass(long mass)
- Specified by:
setMass
in interface ControllableObject
getFuelCapacity
public long getFuelCapacity()
- Specified by:
getFuelCapacity
in interface ControllableObject
setFuelCapacity
public void setFuelCapacity(long fuelCapacity)
- Specified by:
setFuelCapacity
in interface ControllableObject
getFuel
public long getFuel()
- Specified by:
getFuel
in interface ControllableObject
setFuel
public void setFuel(long fuel)
- Specified by:
setFuel
in interface ControllableObject
getFuelPerMilliSecond
public long getFuelPerMilliSecond()
- Specified by:
getFuelPerMilliSecond
in interface ControllableObject
setFuelPerMilliSecond
public void setFuelPerMilliSecond(long fuelPerMilliSecond)
- Specified by:
setFuelPerMilliSecond
in interface ControllableObject
getRotation
public Rotation getRotation()
- Specified by:
getRotation
in interface ControllableObject
setRotation
public void setRotation(Rotation rotation)
- Specified by:
setRotation
in interface ControllableObject
isAligned
public boolean isAligned()
- Specified by:
isAligned
in interface ControllableObject
getRotationSpeed
public double getRotationSpeed()
- Specified by:
getRotationSpeed
in interface ControllableObject
setRotationSpeed
public void setRotationSpeed(double rotationSpeed)
- Specified by:
setRotationSpeed
in interface ControllableObject
getHealth
public int getHealth()
- Specified by:
getHealth
in interface DestroyableObject
- Returns:
- The current health points of this object.
setHealth
public void setHealth(int health)
- Specified by:
setHealth
in interface DestroyableObject
- Parameters:
health
- The new amount of health points to set for this object.
destroy
public void destroy()
- Description copied from interface:
DestroyableObject
- Calling this method will initiate the destruction of this object.
- Specified by:
destroy
in interface DestroyableObject
getScorePoints
public int getScorePoints()
- Specified by:
getScorePoints
in interface DestroyableObject
- Returns:
- The points that shall be added to the player's score.
setHeading
public void setHeading(MissileHeading heading)
getTargetAngle
public double getTargetAngle(double targetAngle,
Vector g)
setWarhead
public void setWarhead(MissileWarhead warhead)
getWarhead
public Warhead getWarhead()
- Specified by:
getWarhead
in interface ShootableWithWarheadObject
update
public void update(long elapsedTime)
- Overrides:
update
in class com.golden.gamedev.object.AnimatedSprite
Copyright © 2008. All Rights Reserved.