moagg.model.object.sprite
Class Ship
java.lang.Object
com.golden.gamedev.object.Sprite
com.golden.gamedev.object.AnimatedSprite
moagg.model.object.sprite.AbstractMoaggAnimatedSprite
moagg.model.object.sprite.Ship
- All Implemented Interfaces:
- java.io.Serializable, ControllableObject, DestroyableObject, LandableObject, MoaggGameObject, ShooterObject
- Direct Known Subclasses:
- GhostShip
public class Ship
- extends AbstractMoaggAnimatedSprite
- implements MoaggGameObject, ControllableObject, ShooterObject, LandableObject, DestroyableObject
- See Also:
- Serialized Form
Fields inherited from class com.golden.gamedev.object.Sprite |
defaultCollisionShape, height, width |
Constructor Summary |
Ship()
|
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 |
Methods inherited from interface moagg.model.object.MoaggGameObject |
getHeight, getID, getPositionRectangle, getSpeed, getWidth, getX, getY, hide, isVisible, setID, setSpeed, setSpeed, setX, setY, show |
Methods inherited from interface moagg.model.object.MoaggGameObject |
getHeight, getID, getPositionRectangle, getSpeed, getWidth, getX, getY, hide, isVisible, setID, setSpeed, setSpeed, setX, setY, show |
Methods inherited from interface moagg.model.object.MoaggGameObject |
getHeight, getID, getPositionRectangle, getSpeed, getWidth, getX, getY, hide, isVisible, setID, setSpeed, setSpeed, setX, setY, show |
Methods inherited from interface moagg.model.object.MoaggGameObject |
getHeight, getID, getPositionRectangle, getSpeed, getWidth, getX, getY, hide, isVisible, setID, setSpeed, setSpeed, setX, setY, show |
Methods inherited from interface moagg.model.object.MoaggGameObject |
getHeight, getID, getPositionRectangle, getSpeed, getWidth, getX, getY, hide, isVisible, setID, setSpeed, setSpeed, setX, setY, show |
Ship
public Ship()
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
isLanded
public boolean isLanded()
- Specified by:
isLanded
in interface LandableObject
setLandedPlatform
public void setLandedPlatform(Platform landedPlatform)
getLandedPlatform
public Platform getLandedPlatform()
- Specified by:
getLandedPlatform
in interface LandableObject
getLandingZone
public Rectangle getLandingZone()
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.
setName
public void setName(java.lang.String name)
getName
public java.lang.String getName()
setShipType
public void setShipType(int shipType)
getShipType
public int getShipType()
setWeapon
public void setWeapon(Weapon weapon)
- Specified by:
setWeapon
in interface ShooterObject
getWeapon
public Weapon getWeapon()
- Specified by:
getWeapon
in interface ShooterObject
hasCrates
public boolean hasCrates()
getCrates
public java.util.List<Crate> getCrates()
hasCapacityForCrate
public boolean hasCapacityForCrate(Crate crate)
hasCrate
public boolean hasCrate(Crate crate)
pickupCrate
public void pickupCrate(Crate crate)
dropCrate
public void dropCrate(Crate crate)
update
public void update(long elapsedTime)
- Overrides:
update
in class com.golden.gamedev.object.AnimatedSprite
Copyright © 2008. All Rights Reserved.