Warning: file_get_contents(http://s4p.us/a/api/?method=generateUrl&param=http%3A%2F%2Fpaste4.us%2Fview_paste%2F16%2F) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/content/82/8776282/html/evbpc.com/paste_system/code/view_paste.php on line 21
Game.java
Fullscreen Options: With Syntax Highlighting | Plain Text | Design View
Short Link:
Game.java
By Aaron
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
47
48
49
50
51
52
 package com.gdxgame;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class Game implements ApplicationListener {
    SpriteBatch batch;
    BitmapFont font;
    Texture image;
    
    @Override
    public void create() {
        batch = new SpriteBatch();
        font = new BitmapFont();
        image = new Texture(Gdx.files.internal("data/libgdx.png"));
    }

    @Override
    public void render() {        
        Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1f);
        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
        
        batch.begin();
        font.draw(batch, "FPS: " + Gdx.graphics.getFramesPerSecond(), 10470);
        batch.draw(image, 0480 - 271);
        batch.end();
    }

    @Override
    public void resize(int width, int height) {
        
    }

    @Override
    public void pause() {
        
    }

    @Override
    public void resume() {
        
    }
    
    @Override
    public void dispose() {
    
    }