|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.petterroea.starterkit.Tile
public class Tile
A tile.
| Field Summary | |
|---|---|
boolean |
collidesWithParticles
True if the tile collides with particles |
boolean |
collidesWithPlayer
True if the tile is collidable with a player object |
int |
gridx
Where the tile is in the tile grid(x coordinate) |
int |
gridy
Where the tile is in the tile grid(y coordinate) |
| Constructor Summary | |
|---|---|
Tile(int gridx,
int gridy)
Constructor for a tile. |
|
| Method Summary | |
|---|---|
boolean |
collidesWith(Entity ent)
Checks if the tile collides with the specific entity |
java.awt.image.BufferedImage |
getTile(Map map)
This is used for getting a specific tile sprite image. |
boolean |
use()
Override this if you want this to be "usable" |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int gridx
public int gridy
public boolean collidesWithPlayer
public boolean collidesWithParticles
| Constructor Detail |
|---|
public Tile(int gridx,
int gridy)
| Method Detail |
|---|
public java.awt.image.BufferedImage getTile(Map map)
map - So you can get if there are tiles nearby, and make it use a sprite that fits for ajacent sprites
public boolean collidesWith(Entity ent)
ent - The entity to check with. Use "ent instanceof NAMEOFYOURENTITYCLASS" to check if the entity is a specific entity
public boolean use()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||