public class LaunchableModel extends FeatureModel implements Launchable
Constructor and Description |
---|
LaunchableModel()
Create the launchable model.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(LaunchableListener listener)
Add a launchable listener.
|
void |
checkListener(Object listener)
Check object interface listening and add them automatically.
|
void |
launch()
Initiate launch by using the defined vector with
Launchable.setVector(Force) starting at the location defined by
Launchable.setLocation(double, double) . |
void |
prepare(FeatureProvider provider)
Prepare the feature.
|
void |
setLocation(double x,
double y)
Set the launch starting location.
|
void |
setVector(Force force)
Set the vector to use when launched.
|
void |
update(double extrp) |
getFeature, getFeatures, getFeaturesType, hasFeature
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeature, getFeatures, getFeaturesType, hasFeature
public LaunchableModel()
The Featurable
owner must have:
public void prepare(FeatureProvider provider)
Feature
Featurable.addFeature(Feature)
or
Featurable.addFeatureAndGet(Feature)
.prepare
in interface Feature
prepare
in class FeatureModel
provider
- The owner reference.public void checkListener(Object listener)
FeatureModel
Feature
provide listeners, this will
allow to add them automatically.
Does nothing by default.
checkListener
in interface Feature
checkListener
in class FeatureModel
listener
- The listener to check.public void addListener(LaunchableListener listener)
Launchable
addListener
in interface Launchable
listener
- The launchable listener to add.public void launch()
Launchable
Launchable.setVector(Force)
starting at the location defined by
Launchable.setLocation(double, double)
.launch
in interface Launchable
public void setLocation(double x, double y)
Launchable
Launchable.launch()
.setLocation
in interface Launchable
x
- The starting horizontal location.y
- The starting vertical location.public void setVector(Force force)
Launchable
Launchable.launch()
.setVector
in interface Launchable
force
- The force to use.Copyright © 2017 Byron 3D Games Studio. All rights reserved.