public void ChooseMenu(Button btn) { switch (btn.name) { case "Start Button": StartBtn.SetActive(false); SubMenu.SetActive(true); break; case "New Game": ProloguePanel.SetActive(true); StartCoroutine("TypeText"); break; case "Battle Button": SceneManager.LoadSceneAsync("Map", LoadSceneMode.Single); break; case "About Game": AboutPanel.SetActive(true); SubMenu.SetActive(false); break; case "Exit About": AboutPanel.SetActive(false); SubMenu.SetActive(true); break; case "Exit": Application.Quit(); break; } }
// Token: 0x06000009 RID: 9 RVA: 0x000023A0 File Offset: 0x000005A0 public static void SplitScreenManager_DelayedRefreshSplitScreen_Horizontal(On.SplitScreenManager.orig_DelayedRefreshSplitScreen orig, SplitScreenManager self) { self.CurrentSplitType = SplitScreenManager.SplitType.Horizontal; orig(self); if (moveGlobalUiToPlayer1) { Vector2 zero = Vector2.zero; Vector2 zero2 = Vector2.zero; if (self.LocalPlayers.Count == 2) { zero2.y = -0.5f; zero.y = -0.5f; } Vector2 vector = Vector2.Scale(zero2, MenuManager.Instance.ScreenSize); Vector2 anchoredPosition = Vector2.Scale(zero, vector); LoadingFade privatePart = Utils.GetPrivatePart <LoadingFade, MenuManager>(MenuManager.Instance, "m_masterLoading"); if (privatePart != null) { RectTransform componentInChildren = privatePart.GetComponentInChildren <RectTransform>(); if (componentInChildren != null) { componentInChildren.sizeDelta = vector; componentInChildren.anchoredPosition = anchoredPosition; } } ProloguePanel privatePart2 = Utils.GetPrivatePart <ProloguePanel, MenuManager>(MenuManager.Instance, "m_prologueScreen"); if (privatePart2 != null) { RectTransform rectTransform = privatePart2.RectTransform; rectTransform.sizeDelta = vector; rectTransform.anchoredPosition = anchoredPosition; } } }
public static void SplitScreenManager_DelayedRefreshSplitScreen_Vertical(On.SplitScreenManager.orig_DelayedRefreshSplitScreen orig, SplitScreenManager self) { self.CurrentSplitType = SplitScreenManager.SplitType.Vertical; DictionaryExt <int, SplitPlayer> privatePart = Utils.GetPrivatePart <DictionaryExt <int, SplitPlayer>, SplitScreenManager>(self, "m_localCharacterUIs"); if (GameDisplayInUI.Instance.gameObject.activeSelf != self.RenderInImage) { GameDisplayInUI.Instance.gameObject.SetActive(self.RenderInImage); } for (int i = 0; i < privatePart.Count; i++) { SplitPlayer splitPlayer = privatePart.Values[i]; Vector3 default_OFFSET = CharacterCamera.DEFAULT_OFFSET; Vector2 zero = Vector2.zero; Vector2 zero2 = Vector2.zero; Rect splitRect = new Rect(0f, 0f, 0f, 0f); RawImage rawImage = (!self.RenderInImage) ? null : GameDisplayInUI.Instance.Screens[i]; float foV; if (privatePart.Count == 1) { splitRect.position = Vector2.zero; splitRect.size = Vector2.one; foV = OptionManager.Instance.GetFoVSolo(i); if (self.RenderInImage) { rawImage.rectTransform.localScale = Vector3.one; GameDisplayInUI.Instance.Screens[1].gameObject.SetActive(false); } GameDisplayInUI.Instance.SetMultiDisplayActive(false); } else { if (privatePart.Count != 2) { throw new NotImplementedException("Support for more than 2 players is not implemented."); } int num = i + 1; if (self.RenderInImage) { splitRect.position = ((i != 0) ? new Vector2(0.5f, 0f) : Vector2.zero); splitRect.size = new Vector2(0.5f, 1f); } else { splitRect.position = new Vector2(0.5f * (float)((i != 0) ? 1 : -1), 0f); splitRect.size = Vector2.one; } foV = OptionManager.Instance.GetFoVSplit(i); default_OFFSET.z = -2.5f; zero2.x = -0.5f; zero.x = (float)((num % 2 != 1) ? -1 : 1) * 0.5f; if (self.RenderInImage) { GameDisplayInUI.Instance.Screens[1].gameObject.SetActive(true); } } CameraSettings cameraSettings; cameraSettings.FoV = foV; cameraSettings.SplitRect = splitRect; cameraSettings.Offset = default_OFFSET; cameraSettings.CameraDepth = 2 * i; cameraSettings.Image = rawImage; splitPlayer.RefreshSplitScreen(zero, zero2, cameraSettings); } if (moveGlobalUiToPlayer1) { Vector2 zero3 = Vector2.zero; Vector2 zero4 = Vector2.zero; if (self.LocalPlayers.Count == 2) { zero4.x = -0.5f; zero3.x = 0.5f; } Vector2 vector = Vector2.Scale(zero4, MenuManager.Instance.ScreenSize); Vector2 anchoredPosition = Vector2.Scale(zero3, vector); LoadingFade privatePart2 = Utils.GetPrivatePart <LoadingFade, MenuManager>(MenuManager.Instance, "m_masterLoading"); if (privatePart2 != null) { RectTransform componentInChildren = privatePart2.GetComponentInChildren <RectTransform>(); if (componentInChildren != null) { componentInChildren.sizeDelta = vector; componentInChildren.anchoredPosition = anchoredPosition; } } ProloguePanel privatePart3 = Utils.GetPrivatePart <ProloguePanel, MenuManager>(MenuManager.Instance, "m_prologueScreen"); if (privatePart3 != null) { RectTransform rectTransform = privatePart3.RectTransform; rectTransform.sizeDelta = vector; rectTransform.anchoredPosition = anchoredPosition; } } }