Ejemplo n.º 1
0
        void Awake()
        {
            Instance = this;

            Packets.RegisterNestedType(SerializationHelpers.SerializeLoadAgent, SerializationHelpers.DeserializeLoadAgent);
            Packets.SubscribeReusable <Commands.Info, NetPeer>(OnInfoCommand);
            Packets.SubscribeReusable <Commands.LoadResult, NetPeer>(OnLoadResultCommand);

            Manager            = new NetManager(this);
            Manager.UpdateTime = 1;
            Manager.Start();
        }
Ejemplo n.º 2
0
 void OnDestroy()
 {
     Manager.Stop();
     Instance = null;
 }