image drawing done.......... for now
This commit is contained in:
parent
ca8dfb9735
commit
1da6cd5ea9
12 changed files with 13 additions and 9 deletions
|
@ -5,24 +5,25 @@ import java.awt.event.KeyEvent;
|
|||
import bz.bronze.pixels.engine.AbstractGame;
|
||||
import bz.bronze.pixels.engine.GameContainer;
|
||||
import bz.bronze.pixels.engine.Renderer;
|
||||
import bz.bronze.pixels.engine.gfx.Image;
|
||||
|
||||
public class GameManager extends AbstractGame {
|
||||
static GameContainer gc;
|
||||
|
||||
private Image image;
|
||||
|
||||
public GameManager() {
|
||||
|
||||
image = new Image("/test.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(float dt) {
|
||||
if (gc.input.isKey(KeyEvent.VK_SPACE)) {
|
||||
System.out.println("pop goes the weasel");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Renderer r) {
|
||||
|
||||
r.drawImage(image, gc.input.mouseX - image.getW() / 2, gc.input.mouseY - image.getH() / 2);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue