C
- The collision type used.public abstract class TileGame<C extends java.lang.Enum<C>>
extends java.lang.Object
pattern
: tilesheet numbernumber
: tile number inside current tilesheetx & y
: real locationcollision
: collision typeConstructor and Description |
---|
TileGame(int width,
int height,
java.lang.Integer pattern,
int number,
C collision)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getBottom()
Get the bottom position of the tile.
|
C |
getCollision()
Get tile collision name.
|
int |
getHeight()
Get the height.
|
int |
getLeft()
Get the left position of the tile.
|
int |
getNumber()
Get tile index number.
|
java.lang.Integer |
getPattern()
Get pattern number.
|
int |
getRight()
Get the right position of the tile.
|
int |
getTop()
Get the top position of the tile.
|
int |
getWidth()
Get the width.
|
int |
getX()
Get tile location x.
|
int |
getY()
Get tile location y.
|
void |
setCollision(C collision)
Set collision name.
|
void |
setNumber(int number)
Set tile index inside pattern.
|
void |
setPattern(java.lang.Integer pattern)
Set pattern number.
|
void |
setX(int x)
Set tile location x.
|
void |
setY(int y)
Set tile location y.
|
public TileGame(int width, int height, java.lang.Integer pattern, int number, C collision)
width
- The tile width.height
- The tile height.pattern
- The tile pattern.number
- The tile number.collision
- The tile collision.public int getLeft()
public int getRight()
public int getTop()
public int getBottom()
public void setPattern(java.lang.Integer pattern)
pattern
- The pattern number.public void setNumber(int number)
number
- The tile index.public void setCollision(C collision)
collision
- The collision name.public int getWidth()
public int getHeight()
public java.lang.Integer getPattern()
public int getNumber()
public int getX()
public int getY()
public C getCollision()
public void setX(int x)
MapTileGame.loadTile(List, FileReading, int)
function.x
- The tile location x.public void setY(int y)
MapTileGame.loadTile(List, FileReading, int)
function.y
- The tile location y.