// Decompiled by DJ v3.8.8.85 Copyright 2005 Atanas Neshkov Date: 2005-8-14 11:30:47
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: RollerCanvas.java
package stone;
import com.nokia.mid.ui.*;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Random;
import javax.microedition.lcdui.*;
// Referenced classes of package stone:
// TonePlayer, RollerLogic
public class RollerCanvas extends FullCanvas
{
class Col
{
int x;
int y;
int z;
int mx;
int my;
int pow;
int pow2;
int team;
int rangex;
int rangey;
int rangez;
Col()
{
}
}
class Thing
{
int id;
int life;
int team;
int dirx;
int aidirx;
int x;
int y;
int z;
int walktox;
int walktoy;
int backupx;
int backupy;
int X;
int Y;
int Z;
int mx;
int my;
int mz;
int imageno;
int skin;
int action;
int backupaction;
int anim;
int frames;
int life2;
int handlex;
int handley;
int invtimer;
Thing()
{
}
}
RollerCanvas(RollerLogic m_Logic)
{
bPaused = false;
animationThread = null;
bPRequested = false;
m_LoseFocus = false;
maxprioritylist = 100;
prioritylist = new byte[maxprioritylist + 1];
maxsprite = 180;
sprite = new Image[maxsprite + 1];
ranObj = new Random();
vieww = 180;
viewh = 210;
testx = 0;
testy = 0;
timexxx = 0;
time200 = 0;
time100 = 0;
time50 = 0;
time40 = 0;
time30 = 0;
time20 = 0;
time10 = 0;
time8 = 0;
time12 = 0;
time5 = 0;
time2 = 0;
showstageclear = 0;
showready = 0;
showdie = 0;
showfadeout = 0;
showfadein = 0;
showgameover = 0;
showcongratulations = 0;
showtimeover = 0;
showtitle = 0;
titlex = 0;
stage = 0;
lives = 0;
DEAD = 0;
GIRL1 = 1;
DUMMY = 2;
TREE = 3;
CONTROL = 4;
DROP = 201;
SLASH1 = 202;
SPLASH = 203;
JUMP = 204;
RUNNINGSTAB = 205;
STAB = 206;
STUN = 207;
PK = 208;
BARGE = 209;
GIRL2 = 301;
SOLDIER1 = 302;
BOSS1 = 303;
BOSS2 = 304;
BOSS3 = 305;
BOSS4 = 306;
RUNNINGATTACK = 307;
JUMPATTACK = 308;
SHORTATTACK = 309;
WAIT = 101;
BOSSWAIT = 102;
gridx = 10;
gridy = 10;
myman = 0;
arealeft = 50;
areatop = 50;
arearight = arealeft + 1000;
areabottom = areatop + 260;
areaw = arearight - arealeft;
areah = areabottom - areatop;
maxmen = 30;
usedmen = 0;
maxlist = 1000;
maxcol = 3;
col = new Col[maxcol + 1];
list = new byte[maxlist + 1];
man = new Thing[maxmen + 1];
maxdrawlist = 150;
useddrawlist = 0;
drawlist = new Thing[maxdrawlist + 1];
bit = new byte[151][51];
numsprite = new Image[12];
loadbarw = 0;
loadstage = 0;
imageReady = false;
this.m_Logic = m_Logic;
}
void DoAIWalk(Thing m, int mx, int my)
{
int attack = 0;
int rangey = 5;
if(ailevel > 1)
{
mx++;
my++;
}
if(ailevel > 2)
my++;
int b = 0;
int t = myman;
m.frames++;
if(m.frames == 1)
{
int left = 0;
int right = 0;
if(m.x < man[t].x)
left -= GetRandomNo(4);
else
right -= GetRandomNo(4);
for(int i = 1; i <= usedmen; i++)
{
if(man[i].action <= 0)
continue;
if(man[i].aidirx < 0)
left++;
if(man[i].aidirx > 0)
right++;
}
m.aidirx = -1;
if(left > right)
m.aidirx = 1;
}
if(time20 == 1)
{
m.walktox = man[t].x + m.dirx * 80 + GetRandomNo(30);
m.walktoy = (man[t].y - 20) + GetRandomNo(40);
}
if(bit[m.x / gridx][m.y / gridy] * gridy > m.z)
{
if(bit[m.x / gridx][m.y / gridy] * gridy > 0)
{
m.x -= m.mx;
m.mx = 0;
}
if(bit[m.x / gridx][m.y / gridy] * gridy > 0)
{
m.y -= m.my;
m.my = 0;
}
}
if(bit[m.x / gridx][m.y / gridy] * gridy > m.z)
{
System.out.println(String.valueOf(String.valueOf((new StringBuffer("floor=")).append(bit[m.x / gridx][m.y / gridy]).append(" m.z=").append(m.z))));
InitAction(m, DROP);
return;
}
b = bit[(m.x + m.mx) / gridx][(m.y + m.my) / gridy] * gridy;
if(b < m.z && b > m.z - 50)
{
InitAction(m, JUMP);
m.my /= 2;
}
if(m.x == m.backupx && m.y == m.backupy)
{
m.walktoy = (short)(m.y + 20);
if(time20 > 10)
m.walktoy = (short)(m.y - 20);
}
m.backupx = m.x;
m.backupy = m.y;
m.mx = 0;
m.my = 0;
m.dirx = 1;
if(m.x > man[t].x)
m.dirx = -1;
if(m.x + mx < m.walktox)
m.mx = mx;
if(m.x - mx > m.walktox)
m.mx = -mx;
if(m.y + my < m.walktoy)
m.my = my;
if(m.y - my > m.walktoy)
m.my = -my;
if(m.mx != 0 || m.my != 0)
m.imageno = m.skin + walkanim;
if(ailevel == 1 && time5 == 1)
attack = 1;
if(ailevel == 2 && (time5 == 1 || time5 == 3))
attack = 1;
if(ailevel == 3)
attack = 1;
if(attack > 0 && man[myman].action != PK)
{
int rangex;
if(GetRandomNo(100) < 15)
{
rangex = 150;
if(m.backupaction >= BOSS1)
rangex = 100;
if(m.backupaction == BOSS3)
rangex = 0;
if(m.x + rangex > man[t].x && m.x - rangex < man[t].x && m.y + rangey > man[t].y && m.y - rangey < man[t].y)
{
InitAction(m, BARGE);
if(ailevel == 1 && m.backupaction < BOSS1 && GetRandomNo(10) < 7)
m.frames -= 6 + GetRandomNo(3);
if(ailevel == 2 && m.backupaction < BOSS1 && GetRandomNo(10) < 5)
m.frames -= 3 + GetRandomNo(3);
}
}
rangex = 50;
if(m.backupaction >= BOSS1)
rangex = 60;
if(m.backupaction == BOSS3)
rangex = 80;
if(m.x + rangex > man[t].x && m.x - rangex < man[t].x && m.y + rangey > man[t].y && m.y - rangey < man[t].y)
{
InitAction(m, SLASH1);
if(ailevel == 1 && m.backupaction < BOSS1 && GetRandomNo(10) < 8)
m.frames -= 7 + GetRandomNo(3);
if(ailevel == 2 && m.backupaction < BOSS1 && GetRandomNo(10) < 7)
m
没有合适的资源?快使用搜索试试~ 我知道了~
longshi.rar_游戏源代码
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共84个文件
png:68个
java:12个
jar:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 16 浏览量
2022-09-19
14:00:57
上传
评论
收藏 278KB RAR 举报
温馨提示
龙石游戏源代码!需要的下载!
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JAR.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/TXT.png)
共 84 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/2416af5c19524431b870352d943af459_weixin_42659196.jpg!1)
周楷雯
- 粉丝: 80
- 资源: 1万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)