public override void OnGotFocus() { textArea.gameObject.SetActive(Game.instance.workshopLevel == null); workshopArea.SetActive(Game.instance.workshopLevel != null); reloadLevelButton.gameObject.SetActive(Game.instance.workshopLevel != null && Game.instance.workshopLevelIsCustom); workshopLevelButton.SetActive(value: false); if (Game.instance.workshopLevel == null) { List <string> list = TutorialRepository.instance.ListShownItems(Game.instance.currentLevelNumber, Game.instance.currentCheckpointNumber + 1); while (list.Count > 5) { list.RemoveAt(0); } textArea.text = string.Join("\r\n-----\r\n", list.ToArray()); } else { Texture2D thumbnailTexture = Game.instance.workshopLevel.thumbnailTexture; workshopThumbnail.texture = thumbnailTexture; workshopTitle.text = Game.instance.workshopLevel.title; workshopDescription.text = LevelSelectMenu2.RichTextProcess(Game.instance.workshopLevel.description); workshopLevelButton.SetActive(Game.instance.IsWorkshopLevel()); NetGame.instance.transport.RegisterForGameOverlayActivation(OnGameOverlayActivation); } base.OnGotFocus(); }
private void Awake() { instance = this; }