public void NotifyGameOver(string id) { PlayerIdStruct message = new PlayerIdStruct(id); io.Emit("gameOver", JsonUtility.ToJson(message)); GameManager.instance.OnGameOver(id); }
void HandleGameOver(SocketIOEvent e) { Debug.Log("handleGameOver"); Debug.Log(e.data); PlayerIdStruct message = JsonUtility.FromJson <PlayerIdStruct>(e.data); GameManager.instance.OnGameOver(message.id); }
public void NotifyPlayerDefeated(string id) { PlayerIdStruct message = new PlayerIdStruct(id); io.Emit("playerDefeated", JsonUtility.ToJson(message)); }
public void NotifyPlayerReady(string id) { PlayerIdStruct message = new PlayerIdStruct(id); io.Emit("playerready", JsonUtility.ToJson(message)); }