Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // first file
- using UnityEngine;
- using System.Collections.Generic;
- using SocketIO;
- public class Network : MonoBehaviour {
- static SocketIOComponent socket;
- void Start()
- {
- socket = GetComponent<SocketIOComponent>();
- socket.On("open", OnConnected);
- }
- void OnConnected(SocketIOEvent e)
- {
- Debug.Log("connected");
- socket.Emit("move");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement