示例#1
0
 public GameForm()
 {
     InitializeComponent();
     game = new Game();
     networkClient =  NetworkClient.getInstance(Constant.SERVER_IP, Constant.SEND_PORT,Constant.LISTEN_PORT);
     networkClient.OnRecieve += onRecieve;
 }
示例#2
0
 public static NetworkClient getInstance(string ipAddress, int sendPort, int listenPort)
 {
     if(instance==null)
     {
         instance = new NetworkClient(ipAddress, sendPort, listenPort);
     }
     return instance;
 }