2012年6月10日 星期日

Java & Slick 遊戲開發15-Land Play State


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;
}

}



沒有留言:

張貼留言