public class ConfigurableModel extends Object implements Configurable
Constructor and Description |
---|
ConfigurableModel()
Constructor.
|
ConfigurableModel(Configurable configurable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Animation |
getDataAnimation(String name)
Get an animation data from its name.
|
boolean |
getDataBoolean(String attribute,
String... path)
Get a boolean in the xml tree.
|
CollisionData |
getDataCollision(String name)
Get a collision data from its name.
|
double |
getDataDouble(String attribute,
String... path)
Get a double in the xml tree.
|
int |
getDataInteger(String attribute,
String... path)
Get an integer in the xml tree.
|
XmlNode |
getDataRoot()
Get the data root container for raw access.
|
String |
getDataString(String attribute,
String... path)
Get a string in the xml tree.
|
void |
loadData(Media media)
Load data from configuration media.
|
public ConfigurableModel()
public ConfigurableModel(Configurable configurable)
configurable
- The configurable reference.public void loadData(Media media)
Configurable
loadData
in interface Configurable
media
- The xml media.public XmlNode getDataRoot()
Configurable
getDataRoot
in interface Configurable
public String getDataString(String attribute, String... path)
getDataString
in interface Configurable
attribute
- The attribute to get as string.path
- The node path (child list)public int getDataInteger(String attribute, String... path)
Configurable
getDataInteger
in interface Configurable
attribute
- The attribute to get as integer.path
- The node path (child list)public boolean getDataBoolean(String attribute, String... path)
Configurable
getDataBoolean
in interface Configurable
attribute
- The attribute to get as boolean.path
- The node path (child list)public double getDataDouble(String attribute, String... path)
Configurable
getDataDouble
in interface Configurable
attribute
- The attribute to get as double.path
- The node path (child list)public Animation getDataAnimation(String name)
Configurable
getDataAnimation
in interface Configurable
name
- The animation name.public CollisionData getDataCollision(String name)
Configurable
getDataCollision
in interface Configurable
name
- The collision name.Copyright © 2014 Byron 3D Games Studio. All rights reserved.