moagg.model.object.sprite
Class Laser

java.lang.Object
  extended by com.golden.gamedev.object.Sprite
      extended by moagg.model.object.sprite.AbstractMoaggSprite
          extended by moagg.model.object.sprite.Laser
All Implemented Interfaces:
java.io.Serializable, DestroyableObject, MoaggGameObject, ShootableObject

public class Laser
extends AbstractMoaggSprite
implements MoaggGameObject, ShootableObject, DestroyableObject

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.golden.gamedev.object.Sprite
defaultCollisionShape, height, width
 
Constructor Summary
Laser()
           
 
Method Summary
 void destroy()
          Calling this method will initiate the destruction of this object.
 double getAngle()
           
 int getDamage()
           
 int getHealth()
           
 int getScorePoints()
           
 ShooterObject getShooter()
           
 boolean isDestroyableByProjectile()
           
 void setAngle(double angle)
           
 void setDamage(int damage)
           
 void setHealth(int health)
           
 void setShooter(ShooterObject shooter)
           
 
Methods inherited from class moagg.model.object.sprite.AbstractMoaggSprite
addSpeed, getPositionRectangle, getRGB, getSpeed, hide, isVisible, setRGB, setSpeed, setVisible, show
 
Methods inherited from class com.golden.gamedev.object.Sprite
addHorizontalSpeed, addVerticalSpeed, forceX, forceY, getBackground, getCenterX, getCenterY, getDataID, getDefaultCollisionShape, getDistance, getHeight, getHorizontalSpeed, getID, getImage, getLayer, getOldX, getOldY, getScreenX, getScreenY, getVerticalSpeed, getWidth, getX, getY, isActive, isImmutable, isOnScreen, isOnScreen, move, moveTo, moveX, moveY, render, render, setActive, setBackground, setDataID, setHorizontalSpeed, setID, setImage, setImmutable, setLayer, setLocation, setMovement, setSpeed, setVerticalSpeed, setX, setY, update, updateMovement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Laser

public Laser()
Method Detail

getShooter

public ShooterObject getShooter()
Specified by:
getShooter in interface ShootableObject
Returns:
The ShooterObject that shooted this projectile.

setShooter

public void setShooter(ShooterObject shooter)

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.

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.

setAngle

public void setAngle(double angle)

getAngle

public double getAngle()


Copyright © 2008. All Rights Reserved.