public class OrientableModel extends TraitModel implements Orientable
The ObjectGame
owner must have the following Trait
:
The Services
must provide the following services:
Constructor and Description |
---|
OrientableModel()
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(ObjectGame owner,
Services services)
Prepare the trait.
|
void |
setOrientation(Orientation orientation)
Set the orientation to use.
|
getOwner
public void prepare(ObjectGame owner, Services services)
Trait
prepare
in interface Trait
prepare
in class TraitModel
owner
- The owner reference.services
- The services 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 © 2016 Byron 3D Games Studio. All rights reserved.