Java ME手机应用开发大全一书的配套光盘上的源码

源代码在线查看: control.java

软件大小: 4439 K
上传用户: zhiver
关键词: Java 手机 应用开发 光盘
下载地址: 免注册下载 普通下载 VIP

相关代码

				package bluetoochgame;
				public class Control {
				  Connection connection;
				  GameWorld gameworld;
				  MyCanvas mycanvas;
				  int selectedX,selectedY;
				  public boolean isServer;
				  boolean myMove;
				  public Control(GameWorld gameworld) {
				    this.gameworld = gameworld;
				    isServer = gameworld.isServer ;
				  }
				
				  public void start()
				  {
				    connection = new Connection(this);
				     connection.start() ;//连接开始
				  }
				
				public void sendMessage(int selected_X,int selected_Y)
				{
				  connection.sendMessage(selected_X,selected_Y);
				}
				
				 public void receiveMessage()
				 {
				    gameworld.receiveMessage() ;
				      System.out.println("control is receivemessage");
				 }
				
				  public int getSelectedX()
				  {
				    selectedX = connection.getSelectedX() ;
				    return selectedX;
				  }
				
				  public int getSelectedY()
				  {
				    selectedY = connection.getSelectedY() ;
				    return selectedY;
				  }
				
				}			

相关资源