|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
S - type of the sprites managed by this game model.public interface GameModel<S>
Define a model associated to a game. Provide functions called by GameScene.
| Modifier and Type | Method and Description |
|---|---|
void |
applyKeyHandledSprites(Function<? super S> function,
long when)
Calls function.fun() on any sprites of type S which should be drawn on the game zone |
void |
applyParallaxInZone(Function<? super S> function,
int x,
int y,
int width,
int height)
Calls function.fun() on any parallax of type S which should be drawn on the zone defined by x, y, width, height |
void |
applyPatternsInZone(Function<? super S> function,
int x,
int y,
int width,
int height)
Calls function.fun() on any patterns of type S which should be drawn on the zone defined by x, y, width, height |
java.awt.Image |
getImage(S sprite)
Returns the image of a given sprite. |
java.awt.Point |
getLocation(S sprite)
Returns the location of a given sprite as a point. |
| Method Detail |
|---|
void applyParallaxInZone(Function<? super S> function,
int x,
int y,
int width,
int height)
function - x - x of the zone to drawy - y of the zone to drawwidth - width of the zone to drawheight - height of the zone to draw
void applyPatternsInZone(Function<? super S> function,
int x,
int y,
int width,
int height)
function - x - y - width - height -
void applyKeyHandledSprites(Function<? super S> function,
long when)
when - function - java.awt.Point getLocation(S sprite)
sprite - the sprite.java.awt.Image getImage(S sprite)
sprite - the sprite.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||