-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame1.java
More file actions
46 lines (38 loc) · 949 Bytes
/
Game1.java
File metadata and controls
46 lines (38 loc) · 949 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
37
38
39
40
41
42
43
44
45
46
package com.game1;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
public class Game1 extends Game {
SpriteBatch batch;
Texture img;
BitmapFont font;
Texture tileimg;
Texture frontimg;
float x = 0;
float y = 0;
@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("badlogic.jpg");
font = new BitmapFont();
font.setColor(Color.BLACK);
font.getData().setScale(5);
tileimg = new Texture("Hjm8sUt.png");
frontimg = new Texture("petemcnally_blog_bergs_var_04.jpg");
this.setScreen(new StartScreen(this));
}
@Override
public void render () {
super.render();
}
@Override
public void dispose () {
batch.dispose();
img.dispose();
font.dispose();
}
}