void Start () { GameObject go = GameObject.Find("SocketIO"); socket = go.GetComponent<SocketIOComponent>(); myscript = go.GetComponent<ectScript>(); socket.On ("talk", ChatMessage); }
void Start () { GameObject go = GameObject.Find("SocketIO"); socket = go.GetComponent<SocketIOComponent>(); myscript = go.GetComponent<ectScript>(); socket.Emit("LoadMap"); socket.On("swapAllPlayer",swapAllPlayer); }
void Start() { DontDestroyOnLoad (gameObject); GameObject go = GameObject.Find("SocketIO"); socket = go.GetComponent<SocketIOComponent>(); myscript = go.GetComponent<ectScript>(); socket.On("open", ServerOpen); socket.On("error", ServerError); socket.On("close", ServerClose); socket.On("loginSuccess",loginSuccess); socket.On("loginUnsuccess",loginUnsuccess); socket.On("swapPlayer",swapPlayer); socket.On ("PlayerMove", PlayerMove); socket.On ("Playerdisconnected", Playerdisconnected); socket.On ("registersuccess", registersuccess); socket.On ("registerunsuccess", registerunsuccess); }
//private ectScript myscript; //public string PlayerName; //public bool xx; //public StatusPlayer Player; //public GameObject otherPlayer; //private bool Login = true; //private string MessLogin = "******"; //private string MessRegister = " "; //public int selectColor = 0; //private string[] OptionColor = new string[]{"red","green","blue"}; //string reName = ""; // Use this for initialization void Start() { DontDestroyOnLoad (gameObject); GameObject go = GameObject.Find("SocketIO"); socket = go.GetComponent<SocketIOComponent>(); myscript = go.GetComponent<ectScript>(); socket.On("loginUnsuccess", loginUnsuccess); socket.On("loginSuccess", loginSuccess); socket.On ("nuevaposicion", PlayerMove); socket.On ("swapPlayer", swapPlayer); socket.On ("swapAllPlayer", swapAllPlayer); }