public class OrientableModel extends FeatureModel implements Orientable, Recyclable
Constructor and Description |
---|
OrientableModel(Services services)
Create an orientable model.
|
Modifier and Type | Method and Description |
---|---|
Orientation |
getOrientation()
Get the current orientation.
|
void |
pointTo(int dtx,
int dty)
Adjust orientation to face to specified tile.
|
void |
pointTo(Tiled tiled)
Adjust orientation to face to specified entity.
|
void |
prepare(FeatureProvider provider)
Prepare the feature.
|
void |
recycle()
Recycle feature, to make it ready for reuse.
|
void |
setOrientation(Orientation orientation)
Set the orientation to use.
|
checkListener, getFeature, getFeatures, getFeaturesType, hasFeature
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkListener
getFeature, getFeatures, getFeaturesType, hasFeature
public OrientableModel(Services services)
The Services
must provide:
The Featurable
must have:
services
- The services reference.public final void recycle()
Recyclable
recycle
in interface Recyclable
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 pointTo(int dtx, int dty)
Orientable
pointTo
in interface Orientable
dtx
- The horizontal tile to face.dty
- The vertical tile to face.public void pointTo(Tiled tiled)
Orientable
pointTo
in interface Orientable
tiled
- The tiled to face to.public void setOrientation(Orientation orientation)
Orientable
setOrientation
in interface Orientable
orientation
- The orientation to use.public Orientation getOrientation()
Orientable
getOrientation
in interface Orientable
Copyright © 2017 Byron 3D Games Studio. All rights reserved.