void Awake() { if (instance != null && instance != this) { Destroy(this); } else { instance = this; lobbyMenu = FindObjectOfType <LobbyMenu>(); DontDestroyOnLoad(gameObject); } }
void Start() { _instance = this; _controller = new LobbyMenuController(this); //Debug.Log("Avatar " + GameManager.GameUser.Avatar); avatar.mainTexture = Helper.LoadTextureForAvatar(GameManager.GameUser.Base.Avatar); lblNickName.text = string.Format("{0}", GameManager.GameUser.Base.NickName); lblLevel.text = GameManager.localization.GetText("Global_Level") + GameManager.GameUser.Base.Level; if (GameManager.GameUser.Base.Level < UserConfig.LEVEL_MAX) { lblExp.text = GameManager.localization.GetText("Global_btn_Exp") + string.Format(": {0}/{1}", GameManager.GameUser.Base.Exp, UserConfig.LEVELS_EXP[GameManager.GameUser.Base.Level]); } else { lblExp.text = ""; } InitAvatarSet(); StartCoroutine(InitListPlayerInZoneUI()); }
private void Start() { ((NetworkController)NetworkManager.singleton).SpawnLobbyMenuController(); LobbyMenuController.InitializeLobbyGUI(); }