/* -------------------------------------------------------------------------------------------------------- */ /* * UNITY STUFF */ /* -------------------------------------------------------------------------------------------------------- */ // Use this for initialization void Awake() { Script = this; // Background stuff mainScreenBGPos.x = 0; mainScreenBGPos.y = 0; mainScreenBGPos.width = Screen.width; mainScreenBGPos.height = Screen.height; // Menu stuff screenX = Screen.width * 0.5f - menuWidth * 0.5f; screenY = Screen.height * 0.5f - menuHeight * 0.5f; //screenY = Screen.height * 0.5f - menuHeight * 0.5f; currentMenu = MainMenu; // Host game window stuff subMenuWindow.x = Screen.width * 0.5f - hostMenuWidth * 0.5f; subMenuWindow.y = (Screen.height * 0.5f - hostMenuHeight * 0.5f) + hostMenuOffsetY; subMenuWindow.width = hostMenuWidth; subMenuWindow.height = hostMenuHeight; // Network stuff netScript = GameObject.Find("NetworkCode").GetComponent<NetworkGame>(); serverName = netScript.GetServerName(); if(playerName == null || playerName == "") { playerName = "RandomName" + Random.Range(1,999); } }