public interface Launcher extends Trait
Launchable
at a defined rate from a defined location using a specified
vector.Launchable
Modifier and Type | Method and Description |
---|---|
void |
addListener(LauncherListener listener)
Add a launcher listener.
|
void |
fire()
Fire with the specified configuration.
|
void |
fire(Localizable target)
Fire with the specified configuration.
|
int |
getOffsetX()
Get the horizontal offset.
|
int |
getOffsetY()
Get the vertical offset.
|
void |
setOffset(int x,
int y)
Set the launcher position offset.
|
void |
setRate(long rate)
Set the fire rate.
|
void addListener(LauncherListener listener)
listener
- The launcher listener to add.void fire()
LauncherListener
will be notified with
LauncherListener.notifyFired(com.b3dgs.lionengine.game.object.ObjectGame)
.LionEngineException
- If the fired object is not a Launchable
.void fire(Localizable target)
LauncherListener
will be notified with
LauncherListener.notifyFired(com.b3dgs.lionengine.game.object.ObjectGame)
.target
- The launch target.LionEngineException
- If the fired object is not a Launchable
.void setOffset(int x, int y)
Launchable
starting position on fire.x
- The horizontal offset.y
- The vertical offset.void setRate(long rate)
rate
- The fire rate in millisecond.int getOffsetX()
int getOffsetY()
Copyright © 2016 Byron 3D Games Studio. All rights reserved.