📄 sevenyearitch$gameover.java
字号:
import com.nokia.mid.sound.Sound;
import com.nokia.mid.ui.FullCanvas;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
public class Gameover extends FullCanvas
{
private final SevenYearItch this$0;
public Gameover()
{
this.this$0 = paramSevenYearItch;
if (paramSevenYearItch.sound == 0)
{
paramSevenYearItch.hurt.stop();
paramSevenYearItch.sc.stop();
paramSevenYearItch.overs.play(1);
}
paramSevenYearItch.a = 15;
paramSevenYearItch.gamePaint = 0;
paramSevenYearItch.gameend = 1;
paramSevenYearItch.game = 0;
paramSevenYearItch.bg = null;
try
{
paramSevenYearItch.imggameover = Image.createImage("/gameover.png");
}
catch (Exception localException)
{
}
}
public void paint()
{
if ((this.this$0.highscorecheck == true) && (this.this$0.points / 10 > this.this$0.HighScoreDisplayDB()))
{
this.this$0.highscoretext = this.this$0.HighScore(this.this$0.points / 10);
this.this$0.highscorecheck = false;
}
paramGraphics.setColor(0, 0, 0);
paramGraphics.fillRect(0, 0, this.this$0.w, this.this$0.h);
if (this.this$0.imggameover != null)
paramGraphics.drawImage(this.this$0.imggameover, 0, -2, 20);
if (this.this$0.lev < 5)
{
paramGraphics.setColor(16763904);
paramGraphics.setFont(Font.getFont(0, 0, 8));
if (this.this$0.rem > 0)
{
paramGraphics.drawString("Bruised and battered,", this.this$0.w / 2, 88, 17);
paramGraphics.drawString("you give up after a", this.this$0.w / 2, 98, 17);
paramGraphics.drawString("tough fight.", this.this$0.w / 2, 108, 17);
paramGraphics.drawString("Score: " + this.this$0.points, this.this$0.w / 2, 117, 17);
}
else if (this.this$0.rem == 0)
{
paramGraphics.drawString("Oops! You’ve run out of", this.this$0.w / 2, 88, 17);
paramGraphics.drawString("dishes. Use them wisely", this.this$0.w / 2, 98, 17);
paramGraphics.drawString("the next time.", this.this$0.w / 2, 108, 17);
paramGraphics.drawString("Score: " + this.this$0.points, this.this$0.w / 2, 117, 17);
}
}
else if (this.this$0.lev == 5)
{
paramGraphics.setColor(16763904);
paramGraphics.setFont(Font.getFont(0, 0, 8));
if (this.this$0.user == 0)
{
paramGraphics.drawString("Congratulations! You WIN!", this.this$0.w / 2, 88, 17);
paramGraphics.drawString("It’s her turn to", this.this$0.w / 2, 98, 17);
paramGraphics.drawString("do the dishes tonight", this.this$0.w / 2, 108, 17);
paramGraphics.drawString("Score: " + this.this$0.points, this.this$0.w / 2, 117, 17);
}
else if (this.this$0.user == 1)
{
paramGraphics.drawString("Congratulations! You WIN!", this.this$0.w / 2, 88, 17);
paramGraphics.drawString("It’s his turn to", this.this$0.w / 2, 98, 17);
paramGraphics.drawString("do the dishes tonight", this.this$0.w / 2, 108, 17);
paramGraphics.drawString("Score: " + this.this$0.points, this.this$0.w / 2, 117, 17);
}
}
}
public void keyPressed()
{
switch (getGameAction(paramInt))
{
case 8:
this.this$0.gameend = 1;
this.this$0.a = 2;
this.this$0.display.setCurrent(this.this$0.intro);
break;
default:
if (paramInt != -6)
return;
this.this$0.gameend = 1;
this.this$0.a = 2;
this.this$0.display.setCurrent(this.this$0.intro);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -