package
javagame;
import
org.newdawn.slick.*;
import
org.newdawn.slick.state.*;
public
class
Play extends
BasicGameState
{
Animation mychar,
movingup,
movingDown,movingLeft,movingRight;
→ 主角和四個動作
Image worldMap;
→ 這個遊戲的背景
boolean
quit =
false;
int[]
duration =
{200,200}; → 每幀的動畫時間
float
mycharPositionX
=0; → 主角X軸
float
mycharPositionY
=0; → 主角Y軸
float
shiftX =
mycharPositionX
+ 320; → 主角在中心
float
shiftY =
mycharPositionY
+ 160; → 主角在中心
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;
}
}
沒有留言:
張貼留言