SmartFoxAddEventListener Method |
Namespace: Sfs2X
public void AddEventListener( string eventType, EventListenerDelegate listener )
void SomeMethod() { sfs.AddEventListener(SFSEvent.CONNECTION, OnConnection); } public void OnConnection(BaseEvent evt) { bool success = (bool)evt.Params["success"]; string error = (string)evt.Params["error"]; Debug.Log("On Connection callback got: " + success + " (error : " + error + ")"); }