jmp.java

来自「一个j2me的滑雪游戏」· Java 代码 · 共 54 行

JAVA
54
字号
//
// 僇乕儕儞僌
//


import com.nttdocomo.ui.*;


public class JMP extends IApplication implements Runnable {

	public JMPS S;

    public void start()
    {
      S = new JMPS();
      Display.setCurrent( S );
//      s.initAll();
      S.initAll( getSourceURL() );
      Thread runner = new Thread(this);
      runner.start();
//	S.start();

    }

    public void resume()
    {
      S.Resume();
    }

    public void run()
    {
	int K = 0;
	long lt = System.currentTimeMillis();
	int c = 0;

		for(;;)
		{
				K |= S.getKeypadState();

			c = (int)( System.currentTimeMillis() - lt ) / 100;

			if (c > 0 )
			{
				PhoneSystem.setAttribute( PhoneSystem.ATTR_BACKLIGHT_ON, 0 );
				S.ProEvent( K );
				lt += c * 100; //System.currentTimeMillis();
				K = 0;
			}

		}
    }
}

⌨️ 快捷键说明

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