Package pvzclone.model.impl
Class BulletImpl
java.lang.Object
pvzclone.model.impl.BulletImpl
Class that implements the interface Bullet.
-
Constructor Details
-
BulletImpl
- Parameters:
speed- the speed of the bulletdamage- the damage of the bulletpos- the position of the bulletname- the name of the bullet
-
-
Method Details
-
getPosition
- Specified by:
getPositionin interfaceEntities- Returns:
- position of the entity.
-
isAlive
public boolean isAlive() -
getEntityName
- Specified by:
getEntityNamein interfaceEntities- Returns:
- name of the entity.
-
getSpeed
public double getSpeed() -
getDamage
public double getDamage() -
move
public void move()Description copied from interface:Bulletmoves the position of the bullet.
-