/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Presentation;
/**
*
* @author Harmonious
*/
import system.*;
import Libraries.*;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.LayerManager;
import javax.microedition.lcdui.game.TiledLayer;
public class maingame extends GameCanvas implements Runnable{
ObjectData od;
Graphics g;
// int[] glasscode;
Image image;
LayerManager lglass, lobject;
int x = 0,y = 0;
public void loaddata(ObjectData o){
od = o;
}
public void start(){
Thread t = new Thread(this);
t.start();
}
private void input() {
int keyStates = getKeyStates();
if ((keyStates & LEFT_PRESSED) != 0){
x++;
}
if ((keyStates & RIGHT_PRESSED) != 0){
x--;
}
if ((keyStates & UP_PRESSED) != 0){
y++;
}
if ((keyStates & DOWN_PRESSED) != 0){
y--;
} }
public maingame(){
super(true);
try { image = Image.createImage("/map.png"); } catch (Exception e){}
int[] glasscode = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 64, 64, 64, 64, 64, 64, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 64, 64, 64, 64, 64, 64, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 64, 64, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 77, 77, 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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 89, 89, 89, 89, 89, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 89, 89, 89, 89, 89, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 89, 89, 89, 89, 89, 89, 89
};
mapgeneration map = new mapgeneration();
TiledLayer glass = map.create(image, glasscode, 32);
lglass = new LayerManager();
lglass.append(glass);
TiledLayer objecs = map.create(image, objectcode, 32);
lobject = new LayerManager();
lobject.append(objecs);
}
public void run(){
g = getGraphics();
while(true){
render(g);
input();
flushGraphics();
try{
Thread.sleep(80);
} catch (Exception ex){
}
}
}
public void render(Graphics g){
setFullScreenMode(true);
g.setColor(0xAAAAAA);
//fill the whole screen
g.fillRect(0, 0, getWidth(), getHeight());
// set drawing color to white
g.setColor(0xffffff);
//display the key code last pressed
lglass.paint(g, x*32, y*32);
lobject.paint(g, x*32, y*32);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
YS.zip_Online client_games
共55个文件
class:24个
java:14个
xml:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 200 浏览量
2022-09-19
21:01:40
上传
评论
收藏 156KB ZIP 举报
温馨提示
Games online mobile j2me Client source j2me http://sfvn.org
资源推荐
资源详情
资源评论
收起资源包目录
YS.zip (55个子文件)
YS
build.xml 4KB
dist
lib
YS.jad 210B
YS.jar 25KB
src
map.png 14KB
Presentation
maingame.java 6KB
gamestart.java 1KB
clsCanvas.java 4KB
system
main.java 746B
ObjectData.java 453B
Thumbs.db 9KB
Libraries
mapgeneration.java 1020B
nbproject
build-impl.xml 71KB
private
private.xml 230B
private.properties 206B
project.xml 378B
genfiles.properties 455B
project.properties 4KB
build
.timestamp 9B
preprocessed
map.png 14KB
Presentation
maingame.java 6KB
SweepGame.java 1KB
gamestart.java 1KB
clsCanvas.java 4KB
CanvasString.java 811B
system
main.java 746B
ObjectData.java 453B
Libraries
mapgeneration.java 1020B
compiled
map.png 14KB
Presentation
SweepGame.class 2KB
CanvasString.class 1KB
gamestart.class 2KB
maingame.class 10KB
clsCanvas.class 2KB
system
main.class 1KB
ObjectData.class 630B
Thumbs.db 9KB
Libraries
mapgeneration.class 1KB
manifest.mf 156B
preverified
map.png 14KB
Presentation
SweepGame.class 2KB
CanvasString.class 1KB
gamestart.class 2KB
maingame.class 10KB
clsCanvas.class 3KB
system
main.class 1KB
ObjectData.class 630B
Libraries
mapgeneration.class 1KB
preverifysrc
Presentation
SweepGame.class 2KB
CanvasString.class 1KB
gamestart.class 2KB
maingame.class 10KB
clsCanvas.class 2KB
system
main.class 1KB
ObjectData.class 630B
Libraries
mapgeneration.class 1KB
共 55 条
- 1
资源评论
小波思基
- 粉丝: 72
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功