📄 yosamabin_n60.java
字号:
this.sanim = -6;
if ((this.bullet1x > this.yosamax) && (this.bullet1x < this.yosamax + this.stand[1].getWidth()) && (this.bullet1y > this.yosamay) && (this.bullet1y < this.yosamay + this.stand[1].getHeight() + this.stand[4].getHeight()))
this.hit = true;
if ((this.bullet2x > this.yosamax) && (this.bullet2x < this.yosamax + this.stand[1].getWidth()) && (this.bullet2y > this.yosamay) && (this.bullet2y < this.yosamay + this.stand[1].getHeight() + this.stand[4].getHeight()))
this.hit = true;
if ((this.parax > this.yosamax) && (this.parax < this.yosamax + this.stand[1].getWidth()) && (this.paray + this.para.getHeight() > this.yosamay) && (this.paray + this.para.getHeight() - 18 < this.yosamay + this.stand[1].getHeight() + this.stand[4].getHeight()))
this.hit = (this.explosion = 1);
if ((this.gcounter % 100 == 0) && (this.weight >= 100))
this.dropsanim = 1;
}
}
public void man1(Graphics paramGraphics, DirectGraphics paramDirectGraphics)
{
if (this.side == 1)
{
if (this.man1x <= w - this.sol[4].getWidth() + 10)
{
this.dir = 2;
this.wait1 += 1;
this.man1x = (w - this.sol[4].getWidth() + 10);
if (this.wait1 == 20)
{
this.bullet1x = this.man1x;
playsnd(3);
}
if (this.wait1 >= 20)
{
paramGraphics.drawImage(this.sol[5], this.bullet1x, this.bullet1y, 0x10 | 0x4);
this.bullet1x -= 12;
}
}
if (this.m1visible)
{
this.man1x -= 4;
if (this.bullet1x <= 0)
{
this.bullet1x = (w + 50);
this.m1visible = false;
this.wait1 = 0;
}
}
else
{
this.man1x += 4;
if (this.man1x >= w)
this.man1x = w;
this.wait1 += 1;
}
if ((this.wait1 >= 21) && (this.wait1 <= 24))
paramGraphics.drawImage(this.sol[4], this.man1x + 5, this.man1y, 0x10 | 0x4);
else
paramGraphics.drawImage(this.sol[4], this.man1x, this.man1y, 0x10 | 0x4);
}
else
{
if (this.man1x >= -10)
{
this.dir = 1;
this.wait1 += 1;
this.man1x = -10;
if (this.wait1 == 20)
{
this.bullet1x = (this.man1x + this.sol[4].getWidth());
playsnd(3);
}
if (this.wait1 >= 20)
{
paramDirectGraphics.drawImage(this.sol[5], this.bullet1x, this.bullet1y, 0x10 | 0x4, 8192);
this.bullet1x += 12;
}
}
if (this.m1visible)
{
this.man1x += 4;
if (this.bullet1x >= w)
{
this.bullet1x = -50;
this.m1visible = false;
this.wait1 = 0;
}
}
else
{
this.man1x -= 4;
if (this.man1x <= -this.sol[4].getWidth())
this.man1x = (-this.sol[4].getWidth());
this.wait1 += 1;
}
if ((this.wait1 >= 21) && (this.wait1 <= 24))
paramDirectGraphics.drawImage(this.sol[4], this.man1x - 5, this.man1y, 0x10 | 0x4, 8192);
else
paramDirectGraphics.drawImage(this.sol[4], this.man1x, this.man1y, 0x10 | 0x4, 8192);
}
}
public void man2(Graphics paramGraphics, DirectGraphics paramDirectGraphics)
{
if (this.side == 2)
{
if (this.man2x >= -10)
{
this.dir = 1;
this.wait2 += 1;
this.man2x = -10;
if (this.wait2 == 20)
{
this.bullet2x = (this.man2x + this.sol[2].getWidth());
playsnd(3);
}
if (this.wait2 >= 20)
{
paramDirectGraphics.drawImage(this.sol[3], this.bullet2x, this.bullet2y, 0x10 | 0x4, 8192);
this.bullet2x += 12;
}
}
if (this.m2visible)
{
this.man2x += 4;
if (this.bullet2x >= w)
{
this.bullet2x = -50;
this.m2visible = false;
this.wait2 = 0;
}
}
else
{
this.man2x -= 4;
if (this.man2x <= -this.sol[1].getWidth())
this.man2x = (-this.sol[1].getWidth());
}
if ((this.wait2 >= 21) && (this.wait2 <= 24))
paramDirectGraphics.drawImage(this.sol[2], this.man2x, this.man2y, 0x10 | 0x4, 8192);
else
paramDirectGraphics.drawImage(this.sol[1], this.man2x, this.man2y, 0x10 | 0x4, 8192);
}
else
{
if (this.man2x <= w - this.sol[1].getWidth() + 10)
{
this.dir = 2;
this.wait2 += 1;
this.man2x = (w - this.sol[1].getWidth() + 10);
if (this.wait2 == 20)
{
this.bullet2x = (w - this.sol[2].getWidth() + 10);
playsnd(3);
}
if (this.wait2 >= 20)
{
paramGraphics.drawImage(this.sol[3], this.bullet2x, this.bullet2y, 0x10 | 0x4);
this.bullet2x -= 12;
}
}
if (this.m2visible)
{
this.man2x -= 4;
if (this.bullet2x <= 0)
{
this.bullet2x = (w + 50);
this.m2visible = false;
this.wait2 = 0;
}
}
else
{
this.man2x += 4;
if (this.man2x >= w)
this.man2x = w;
}
if ((this.wait2 >= 21) && (this.wait2 <= 24))
paramGraphics.drawImage(this.sol[2], this.man2x, this.man2y, 0x10 | 0x4);
else
paramGraphics.drawImage(this.sol[1], this.man2x, this.man2y, 0x10 | 0x4);
}
}
public void para(Graphics paramGraphics)
{
if (this.paray >= h)
{
this.paravisible = true;
if (level == 4)
this.paray = (-this.para.getHeight() - 200);
this.parax = (this.rd.nextInt() % 100);
if (this.parax < 0)
this.parax = (-this.parax);
this.parax += 25;
this.fixedx = this.parax;
}
if (this.parax <= this.fixedx - this.pboundry)
this.pdir = 1;
if (this.parax >= this.fixedx + this.pboundry)
this.pdir = 2;
if (this.pdir == 1)
this.parax += 1;
else
this.parax -= 1;
this.paray += 2;
if ((this.paray >= h - this.para.getHeight() - 15) || (this.explosion))
{
this.fireanim += 1;
this.paravisible = false;
if (this.fireanim == 1)
{
paramGraphics.drawImage(this.exp[1], this.parax, this.paray, 0x10 | 0x1);
playsnd(2);
}
else if (this.fireanim == 2)
{
paramGraphics.drawImage(this.exp[2], this.parax, this.paray, 0x10 | 0x1);
}
else if (this.fireanim == 3)
{
paramGraphics.drawImage(this.exp[3], this.parax, this.paray, 0x10 | 0x1);
}
else if (this.fireanim == 4)
{
paramGraphics.drawImage(this.exp[4], this.parax, this.paray, 0x10 | 0x1);
this.paray = h;
this.fireanim = 0;
this.explosion = false;
}
}
if (this.paravisible)
paramGraphics.drawImage(this.para, this.parax, this.paray, 0x10 | 0x1);
}
public void End()
{
a = 10;
this.display.setCurrent(this.intro);
}
public void intsnd()
{
for (int j = 0; j < 6; ++j)
try
{
this.istream[j] = getClass().getResourceAsStream(this.sndnm[j]);
snd[j] = Manager.createPlayer(this.istream[j], this.sndty[j]);
snd[j].realize();
snd[j].prefetch();
}
catch (Exception localException)
{
localException.printStackTrace();
}
}
public void playsnd(int paramInt)
{
try
{
i = 0;
while (i < 6)
{
if (i != 1)
snd[i].stop();
i += 1;
}
if (this.sound)
snd[paramInt].start();
}
catch (MediaException localMediaException)
{
}
}
public static byte[] a(String paramString)
{
paramString.toUpperCase();
byte[] arrayOfByte = new byte[paramString.length() / 2];
int j = 0;
int l = 0;
for (int i1 = paramString.length() / 2; i1 > 0; --i1)
{
int i2;
if ((paramString.charAt(l) >= '0') && (paramString.charAt(l) <= '9'))
i2 = paramString.charAt(l) - '0';
else
i2 = paramString.charAt(l) - 'A' + 10;
i2 *= 16;
if ((paramString.charAt(l + 1) >= '0') && (paramString.charAt(l + 1) <= '9'))
i2 += paramString.charAt(l + 1) - '0';
else
i2 += paramString.charAt(l + 1) - 'A' + 10;
arrayOfByte[j] = (byte)i2;
l += 2;
++j;
}
return arrayOfByte;
}
public static Sound a(MIDlet paramMIDlet, String paramString, byte[] paramArrayOfByte)
{
DataInputStream localDataInputStream;
try
{
localDataInputStream = new DataInputStream(paramMIDlet.getClass().getResourceAsStream(paramString));
int j = localDataInputStream.read(paramArrayOfByte);
byte[] arrayOfByte = new byte[j];
System.arraycopy(paramArrayOfByte, 0, arrayOfByte, 0, arrayOfByte.length);
Sound localSound = new Sound(arrayOfByte, 1);
localDataInputStream.close();
return localSound;
}
catch (Exception localException)
{
localException.printStackTrace();
}
return null;
}
public void Sorting()
{
for (int j = 0; j < this.scr.length; ++j)
{
this.xch = 0;
for (int l = 0; l < this.scr.length - j - 1; ++l)
if (this.scr[l] < this.scr[(l + 1)])
{
this.temp = this.scr[l];
this.temp1 = this.str[l];
this.scr[l] = this.scr[(l + 1)];
this.str[l] = this.str[(l + 1)];
this.scr[(l + 1)] = this.temp;
this.str[(l + 1)] = this.temp1;
this.xch += 1;
}
if (this.xch == 0)
return;
}
}
public void PlayAgain()
{
level = 1;
levelch();
a = 20;
this.lives = 5;
this.weight = 0;
this.motion = 4;
this.won = false;
}
public void levelch()
{
this.st1visible = (this.st2visible = this.st3visible = 1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -