-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGame.java
More file actions
36 lines (30 loc) · 821 Bytes
/
Copy pathGame.java
File metadata and controls
36 lines (30 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.pipon.mergeemall;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.pipon.mergeemall.input.InputManager;
import com.pipon.mergeemall.view.GameScene;
public class Game extends ApplicationAdapter {
public static final String TITLE = "MERGE'EM ALL";
public static final int WIDTH = 600;
public static final int HEIGHT = 400;
private GameScene gs = new GameScene();
private InputManager inputManager = new InputManager();
@Override
public void create () {
gs.create();
gs.render();
Gdx.input.setInputProcessor(inputManager);
}
@Override
public void render () {
if(inputManager.isValid()) {
System.out.println(inputManager.getDir());
gs.render();
}
}
@Override
public void dispose () {
gs.dispose();
}
}