java Me中的按键和触屏实例(2)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:15 点击:次
notifyDestroyed();
}
}
class PlaneCanvas extends Canvas implements CommandListener
{
private Plane plane=null;
private Command exit=null;
private Command start=null;
private Command over=null;
private Command point=null;
private Command trante=null;
private boolean key_event=false;
private boolean point_event=false;
private boolean trante_event=false;
private int plan_x=0;
private int plane_y=0;
private int trante_x=0;
private int trante_y=0;
private Image planeImage=null;
public PlaneCanvas(Plane plane)//close()
{
this.plane=plane;
try
{
planeImage=Image.createImage("/com/canvas/image/plane.png");
}
catch (IOException e)
{
e.printStackTrace();
}
相关新闻>>
- 发表评论
-
- 最新评论 更多>>