addState(GameState)
类型中的方法StateBasedGame
不适用于参数(Play)
我遇到以下代码的上述错误我似乎无法找到任何可以帮助我解决这个问题的东西,而且我仍然是Java的初学者。我完成设置后,我正试图制作乒乓球游戏......
package pong;
import org.newdawn.slick.*;
import org.newdawn.slick.state.*;
public class pongmain extends StateBasedGame{
public pongmain(String gamename) {
super(gamename);
this.addState(new Play(play));
}
public static final String gamename = "Pong";
public static void main(String[] args) {
// TODO Auto-generated method stub
}
@Override
public void initStatesList(GameContainer gc) throws SlickException {
// TODO Auto-generated method stub
}
}