public class Tile extends java.lang.Object implements GameDataSerializable, org.mini2Dx.gdx.utils.Disposable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PROPERTY_MAP_SIZE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsProperty(java.lang.String propertyName)
Returns if the layer contains the specified property
|
static Tile |
create() |
void |
dispose() |
void |
draw(Graphics g,
int renderX,
int renderY,
float alpha) |
void |
draw(Graphics g,
int renderX,
int renderY,
float alpha,
boolean flipH,
boolean flipV,
boolean flipD) |
boolean |
equals(java.lang.Object o) |
org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,java.lang.String> |
getProperties()
Returns the properties
ObjectMap of this Tile |
java.lang.String |
getProperty(java.lang.String propertyName)
Returns the value of a specified property
|
int |
getTileId()
Deprecated.
|
int |
getTileId(int firstGid) |
TileRenderer |
getTileRenderer() |
int |
hashCode() |
void |
readData(java.io.DataInputStream inputStream)
Deserializes this object from a
DataInputStream |
void |
setProperty(java.lang.String propertyName,
java.lang.String value)
Sets the value of a specified property
|
void |
setTileId(int tileId) |
void |
setTileRenderer(TileRenderer tileRenderer) |
java.lang.String |
toString() |
void |
update(float delta) |
void |
writeData(java.io.DataOutputStream outputStream)
Serializes this object to a
DataOutputStream |
public static Tile create()
public void writeData(java.io.DataOutputStream outputStream)
throws java.io.IOException
GameDataSerializableDataOutputStreamwriteData in interface GameDataSerializableoutputStream - The DataOutputStream to write tojava.io.IOException - Thrown if an error occurs during I/Opublic void readData(java.io.DataInputStream inputStream)
throws java.io.IOException
GameDataSerializableDataInputStreamreadData in interface GameDataSerializableinputStream - The DataInputStream to read fromjava.io.IOException - Thrown if an error occurs during I/Opublic void update(float delta)
public void draw(Graphics g, int renderX, int renderY, float alpha, boolean flipH, boolean flipV, boolean flipD)
public void draw(Graphics g, int renderX, int renderY, float alpha)
public boolean containsProperty(java.lang.String propertyName)
propertyName - The property name to search forpublic java.lang.String getProperty(java.lang.String propertyName)
propertyName - The property name to search forpublic void setProperty(java.lang.String propertyName,
java.lang.String value)
propertyName - The property name to set the value forvalue - The value of the property to setpublic org.mini2Dx.gdx.utils.ObjectMap<java.lang.String,java.lang.String> getProperties()
ObjectMap of this Tile@Deprecated public int getTileId()
public int getTileId(int firstGid)
public void setTileId(int tileId)
public TileRenderer getTileRenderer()
public void setTileRenderer(TileRenderer tileRenderer)
public void dispose()
dispose in interface org.mini2Dx.gdx.utils.Disposablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object