add die
This commit is contained in:
parent
1dfc2b50b1
commit
8e6527afa0
5 changed files with 100 additions and 6 deletions
|
@ -1,22 +1,37 @@
|
|||
package com.monjaro.gamejam;
|
||||
|
||||
import com.badlogic.gdx.ApplicationAdapter;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
public class Game extends ApplicationAdapter {
|
||||
SpriteBatch batch;
|
||||
Texture img;
|
||||
|
||||
|
||||
private SpriteBatch batch;
|
||||
private Texture img;
|
||||
|
||||
private static int TICKS_PER_SECOND;
|
||||
private double tickProgress = 0;
|
||||
|
||||
@Override
|
||||
public void create () {
|
||||
public void create() {
|
||||
batch = new SpriteBatch();
|
||||
img = new Texture("badlogic.jpg");
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render () {
|
||||
public void render() {
|
||||
Gdx.graphics.getDeltaTime();
|
||||
while (tickProgress >= 1) { //tick as many times as needed
|
||||
tick();
|
||||
tickProgress--;
|
||||
}
|
||||
|
||||
ScreenUtils.clear(1, 0, 0, 1);
|
||||
batch.begin();
|
||||
batch.draw(img, 0, 0);
|
||||
|
@ -24,8 +39,9 @@ public class Game extends ApplicationAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void dispose () {
|
||||
public void dispose() {
|
||||
batch.dispose();
|
||||
img.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue