void Awake()
 {
     if (!instance)
     {
         instance = this;
         packet   = new DGTPacket(this);
         SetState(State.DISCONNECTED);
         DontDestroyOnLoad(this);
     }
     else
     {
         if (this != instance)
         {
             Destroy(this.gameObject);
         }
     }
 }
 void Awake()
 {
     _Packet = new DGTPacket(this);
     _State  = State.DISCONNECTED;
     //test();
 }
Beispiel #3
0
 public NetworkController()
 {
     _connection = new DGTPacket(this);
 }