| demo.DemoGameCanvas
DemoGameCanvas | public class DemoGameCanvas extends GameCanvas implements Runnable(Code) | | author: Karel Herink version: 1.0 |
Method Summary | |
public void | run() The main game loop that checks for user input and repaints canvas. | public boolean | spriteCollides(Sprite sprite) Check if sprite collides with either the other sprite or
with a layer that holds obstacles or with the edge of the base layer. | public void | stop() Stops the main game loop. |
DemoGameCanvas | public DemoGameCanvas()(Code) | | |
run | public void run()(Code) | | The main game loop that checks for user input and repaints canvas.
|
spriteCollides | public boolean spriteCollides(Sprite sprite)(Code) | | Check if sprite collides with either the other sprite or
with a layer that holds obstacles or with the edge of the base layer.
Parameters: sprite - the sprite checked for collision with other layers true is sprite does collide, false otherwise |
stop | public void stop()(Code) | | Stops the main game loop.
|
|
|