把所有你需要的圖像文件放在res文件
In
Menu.java:
package
javagame;
import
org.newdawn.slick.*;
import
org.newdawn.slick.state.*;
import
org.lwjgl.input.Mouse;
public
class
Menu extends
BasicGameState
{
public
Menu(int
State)
{
}
public
void
init(GameContainer gc,StateBasedGame sbg) throws
SlickException
{
}
public
void
render(GameContainer gc,StateBasedGame sbg, Graphics g) throws
SlickException
{
}
public
void
update(GameContainer gc,StateBasedGame sbg, int
delta) throws
SlickException
{
}
public
int
getID()
{
return
0;
}
}
In
Play.java:
package
javagame;
import
org.newdawn.slick.*;
import
org.newdawn.slick.state.*;
public
class
Play extends
BasicGameState
{
public
Play(int
State)
{
}
public
void
init(GameContainer gc,StateBasedGame sbg) throws
SlickException
{
}
public
void
render(GameContainer gc,StateBasedGame sbg, Graphics g) throws
SlickException
{
}
public
void
update(GameContainer gc,StateBasedGame sbg, int
delta) throws
SlickException
{
}
public
int
getID()
{
return
1;
}
}
沒有留言:
張貼留言