-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMechWreck.java
More file actions
62 lines (54 loc) · 1.19 KB
/
MechWreck.java
File metadata and controls
62 lines (54 loc) · 1.19 KB
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
53
54
55
56
57
58
59
60
61
62
package com.mechwreck;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.Texture;
import com.mechwreck.gameobjects.ParticleEffects;
import com.mechwreck.screen.SplashScreen;
import com.mechwreck.wireless.WifiHelper;
/**
* Entrance point for the application. Starts the splash screen.
*/
public class MechWreck extends Game {
/**
* Called when the game is created.
*
* pre:
* None.
* post:
* Game is created/started.
*/
@Override
public void create() {
Gdx.gl.glClearColor(0, 0, 0, 0);
Gdx.input.setInputProcessor(new InputMultiplexer());
Texture.setEnforcePotImages(false);
setScreen(new SplashScreen(this));
//Fixes lag bug
ParticleEffects.YOLO();
}
/*
* Clears the screen then renders the current screen.
*
* pre:
* None.
* post:
* Game is rendered.
*/
@Override
public void render() {
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
super.render();
}
/*
* Disposes of Mech Wreck
*/
@Override
public void dispose() {
WifiHelper.closeClient();
WifiHelper.closeServer();
getScreen().dispose();
super.dispose();
}
}