Beispiel #1
0
    public async void CreateRoom()
    {
        s.SendMSG("room,debug,2,,player1");
        FindObjectOfType <MyPlayer>().name = "player1";
        await ServerCommend();

        FindObjectOfType <SceneController>().LoadNextScene();
    }
Beispiel #2
0
    public void MoveUnit(string obj, int objID, int toX, int toY)
    {
        string msg = action;

        msg += "," + myName;           //commend[1]
        msg += "," + "move";           //commend[2]
        msg += "," + obj;              //commend[3]
        msg += "," + objID.ToString(); //commend[4]
        msg += "," + toX.ToString();   //commend[5]
        msg += "," + toY.ToString();   //commend[6]
        s.SendMSG(msg);
    }
 void  Start()
 {
     s = FindObjectOfType <SocketController>();
     s.SendMSG("refresh");
 }