public void Start() { characterSelectController = GetComponentInParent <CharacterSelectController>(); eclipseRunScreenController = GetComponentInParent <EclipseRunScreenController>(); StartCoroutine(StartDelayedCoroutine()); }
private static void CloneGlyphInEclipse(EclipseRunScreenController self) { var submenu = self.transform.Find("Main Panel/SubmenuLegend"); var glyph = GameObject.Instantiate(submenu.Find("GenericGlyphAndDescription"), submenu); glyph.SetAsFirstSibling(); glyph.transform.Find("Text").GetComponent <InputBindingDisplayController>().actionName = "UISubmitAlt"; glyph.transform.Find("Description").GetComponent <LanguageTextMeshController>().token = RandomCharacterSelectionPlugin.RANDOMIZE_CHARACTER_BUTTON; }
internal static void EclipseRunScreenControllerStart(On.RoR2.UI.EclipseRunScreenController.orig_Start orig, EclipseRunScreenController self) { orig(self); var rightPanel = self.transform.Find("Main Panel/RightPanel"); if (!CachedPrefab) { CachePrefabFromSurvivorGrid(rightPanel, "HeaderContainer"); } var randomizePanel = GameObject.Instantiate(CachedPrefab, self.transform.Find("Main Panel"), false); randomizePanel.GetComponents <HGGamepadInputEvent>().First(inputEvent => inputEvent.actionName == "UISubmitAlt").enabled = true; var rectTransform = randomizePanel.GetComponent <RectTransform>(); rectTransform.anchorMin = new Vector2(1, 1); rectTransform.anchorMax = new Vector2(1, 1); rectTransform.pivot = new Vector2(1, 1); rectTransform.anchoredPosition = new Vector2(-672, -130); CloneGlyphInEclipse(self); }