⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c.java

📁 大富翁手机游戏
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 

import java.util.Timer;
import javax.microedition.lcdui.*;

public class c extends Canvas
    implements CommandListener
{

    RichmanTaiwanMIDlet b;
    boolean c;
    public int d;
    private Timer a;

    public c(RichmanTaiwanMIDlet richmantaiwanmidlet, boolean flag)
    {
        b = richmantaiwanmidlet;
        c = flag;
        d = 1;
        if(flag)
            richmantaiwanmidlet.e = 4;
        else
            richmantaiwanmidlet.e = 5;
        addCommand(new Command("返回", 2, 1));
        setCommandListener(this);
    }

    public void keyPressed(int i)
    {
        switch(getGameAction(i))
        {
        default:
            break;

        case 2: // '\002'
            if(d == 2)
            {
                d = 1;
                break;
            }
            if(d == 3)
                d = 2;
            break;

        case 5: // '\005'
            if(d == 1)
            {
                d = 2;
                break;
            }
            if(d == 2)
                d = 3;
            break;
        }
        repaint();
        serviceRepaints();
    }

    public void paint(Graphics g)
    {
        g.setColor(0, 0, 0);
        g.fillRect(0, 0, getWidth(), getHeight());
        try
        {
            g.drawImage(Image.createImage("/help" + d + ".png"), getWidth() / 2, getHeight() / 2, 3);
            if(d == 2 || d == 1)
                g.drawImage(Image.createImage("/arrow.png"), 174, 181, 40);
            if(d == 2 || d == 3)
                g.drawImage(Image.createImage("/arrowf.png"), 1, 181, 36);
        }
        catch(Exception exception)
        {
            exception.printStackTrace();
        }
    }

    public void a()
    {
        repaint();
    }

    protected void hideNotify()
    {
        b.f = true;
    }

    public void commandAction(Command command, Displayable displayable)
    {
        Command _tmp = command;
        if(command.getCommandType() == 2)
        {
            if(c)
            {
                if(a != null)
                {
                    a.cancel();
                    a = null;
                }
                b.a(false);
                return;
            }
            if(!c)
            {
                if(a != null)
                {
                    a.cancel();
                    a = null;
                }
                b.b();
                return;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -