Add support for key event handling in GUI
This commit is contained in:
@@ -4,6 +4,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.bartlomiejpluta.base.api.game.context.Context;
|
||||
import com.bartlomiejpluta.base.api.game.input.Input;
|
||||
import com.bartlomiejpluta.base.api.game.screen.Screen;
|
||||
import com.bartlomiejpluta.base.api.game.runner.GameRunner;
|
||||
|
||||
@@ -12,6 +13,9 @@ public class ${className} implements GameRunner {
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
// Resume engine, because it is initially paused
|
||||
context.resume();
|
||||
|
||||
log.info("The game runner is not implemented yet...");
|
||||
throw new RuntimeException("Not implemented yet");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package ${package};
|
||||
|
||||
import com.bartlomiejpluta.base.api.game.context.Context;
|
||||
import com.bartlomiejpluta.base.api.game.input.Input;
|
||||
import com.bartlomiejpluta.base.api.game.map.model.GameMap;
|
||||
import com.bartlomiejpluta.base.api.game.map.handler.MapHandler;
|
||||
import com.bartlomiejpluta.base.api.game.screen.Screen;
|
||||
@@ -18,7 +19,7 @@ public class ${className} implements MapHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void input(Screen screen) {
|
||||
public void input(Input input) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user