void Awake()
    {
        dgtMainController = DGTMainController.GetInstance();
        deadScreen        = Instantiate(deadScreenPrefab);
        deadScreen.SetActive(false);
//		DGTRemote gamestate = DGTRemote.GetInstance();
//        gamestate = DGTRemote.GetInstance();
    }
Ejemplo n.º 2
0
 public static DGTMainController GetInstance()
 {
     if (g_instance == null)
     {
         gameObjectState = new GameObject("DGTMainController");
         g_instance      = gameObjectState.AddComponent <DGTMainController>();
         DontDestroyOnLoad(gameObjectState);
     }
     return(g_instance);
 }
 void Start()
 {
     if (DGTMainController.ReferenceEquals(Instance, null))
     {
         Instance         = this;
         Instance.inWorld = false;
         StartCoroutine(ConnectToServer(isLocalhost?"192.168.1.48":ipaddress[0], port[0]));
         DontDestroyOnLoad(this);
     }
     else
     {
         Destroy(this.gameObject);
     }
 }