TiledLayerDemo.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- import javax.microedition.lcdui.*;
- import javax.microedition.midlet.*;
- public class TiledLayerDemo extends MIDlet
- {
- private MyCanvas canvas;
- public TiledLayerDemo() {
- }
- protected void startApp( ) throws MIDletStateChangeException
- {
- canvas=new MyCanvas(this); //创建MyCanvas屏幕画布
- Display.getDisplay(this).setCurrent(canvas);//显示该画布
- canvas.start();//开始游戏线程
- }
- protected void pauseApp( ) {
- canvas.stop();//停止线程
- }
- protected void destroyApp( boolean unconditional ) {
- canvas.stop();//停止线程
- }
- public void exitMidlet()
- {
- destroyApp(false);
- notifyDestroyed();
- }
- }