javame拼图代码

时间:2016-07-07 19:27:32
【文件属性】:

文件名称:javame拼图代码

文件大小:513B

文件格式:JAVA

更新时间:2016-07-07 19:27:32

javame

public class PictureCanvas extends GameCanvas implements Runnable{ TiledLayer picLayer; int picture[][]={{1,2},{3,4},{5,6},{7,8}}; int selected=7; int takeOutTitle; int screenWidth=this.getWidth(); int screenHeight=this.getHeight(); int x=(screenWidth-176)/2; int y=(screenHeight-208)/2; static int moveCnt=0; static long costTime=0; long gameStartTime,gameNowTime; Graphics g=this.getGraphics(); public PictureCanvas(){ super(true); try { Image img = Image.createImage("/menu.png"); picLayer=new TiledLayer(picture[0].length,picture.length,img,88,52); picLayer.setPosition(x, y); } catch (IOException ex) { ex.printStackTrace(); } initPicture();


网友评论