-
Notifications
You must be signed in to change notification settings - Fork 1
/
PantallaPausa.java
58 lines (48 loc) · 1.33 KB
/
PantallaPausa.java
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
package FightKnights.Logic;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.Music;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
/**
*
* @author alex1
*/
public class PantallaPausa extends BasicGameState
{
private Image fondo;
private Input raton;
private Music musica;
private boolean ratonPress;
public PantallaPausa() throws SlickException
{
}
@Override
public int getID()
{
return 4;
}
@Override
public void init(GameContainer container, StateBasedGame game) throws SlickException
{
fondo = new Image("res/pausa.png");
raton = container.getInput();
}
@Override
public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException
{
g.drawImage(fondo, 275, 0);
}
@Override
public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException
{
ratonPress = raton.isMousePressed(Input.MOUSE_LEFT_BUTTON);
if(ratonPress)
{
game.enterState(1);
}
}
}