This commit is contained in:
Rosia E Evans 2024-04-20 16:17:34 +01:00
commit 2544da0313

View file

@ -2,6 +2,7 @@ package com.monjaro.gamejam;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
@ -38,10 +39,18 @@ public class Game extends ApplicationAdapter {
}
public void tick() {
actors.forEach(Actor::tick);
processInput();
actors.forEach(Actor::tick);
}
public void processInput() {
Input input = Gdx.input;
if (input.isKeyJustPressed(Input.Keys.R)) {
dice.forEach(Die::roll);
}
}
@Override
public void render() {