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:
getPosition
in interfaceEntities
- Returns:
- position of the entity.
-
isAlive
public boolean isAlive() -
getEntityName
- Specified by:
getEntityName
in interfaceEntities
- Returns:
- name of the entity.
-
getSpeed
public double getSpeed() -
getDamage
public double getDamage() -
move
public void move()Description copied from interface:Bullet
moves the position of the bullet.
-