moagg.model.object
Interface DestroyableObject

All Superinterfaces:
MoaggGameObject
All Known Subinterfaces:
ShootableObject, ShootableWithWarheadObject
All Known Implementing Classes:
DestroyableTile, GhostShip, Grenade, Laser, Missile, Mortar, Projectile, Sam, Ship, Tank, Turret

public interface DestroyableObject
extends MoaggGameObject

Game objects that can be destroyed have to implement this interface.


Method Summary
 void destroy()
          Calling this method will initiate the destruction of this object.
 int getHealth()
           
 int getScorePoints()
           
 void setHealth(int health)
           
 
Methods inherited from interface moagg.model.object.MoaggGameObject
getHeight, getID, getPositionRectangle, getSpeed, getWidth, getX, getY, hide, isVisible, setID, setSpeed, setSpeed, setX, setY, show
 

Method Detail

getHealth

int getHealth()
Returns:
The current health points of this object.

setHealth

void setHealth(int health)
Parameters:
health - The new amount of health points to set for this object.

destroy

void destroy()
Calling this method will initiate the destruction of this object.


getScorePoints

int getScorePoints()
Returns:
The points that shall be added to the player's score.


Copyright © 2008. All Rights Reserved.