Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (object obj in mainMenuMode.chooseModeUI.transform)
- {
- if (((Transform)obj).gameObject.name.Equals("StandardMode"))
- {
- Console.WriteLine(((Transform)obj).gameObject.tag);
- GameObject gameObject4 = UnityEngine.Object.Instantiate<GameObject>(((Transform)obj).gameObject, ((Transform)obj).parent);
- gameObject4.name = "MultiplayerMode";
- gameObject4.transform.SetParent(((Transform)obj).parent);
- gameObject4.transform.localPosition = new Vector3(150f, 138f, 0f);
- gameObject4.transform.localPosition += new Vector3(-64f, 0f, 0f);
- Localize[] components = gameObject4.GetComponentsInChildren<Localize>();
- for (int i = 0; i < components.Length; i++)
- {
- UnityEngine.Object.Destroy(components[i]);
- }
- TextMeshProUGUI[] componentsInChildren = gameObject4.GetComponentsInChildren<TextMeshProUGUI>();
- componentsInChildren[0].text = "Multiplayer Mode";
- componentsInChildren[1].text = "Choose from three difficulty modes and join forces with other players to build or battle.";
- componentsInChildren[2].text = "Accept";
- Component[] components2 = gameObject4.GetComponentsInChildren<Component>();
- for (int j = 0; j < components2.Length; j++)
- {
- Console.WriteLine(components2[j].GetType().FullName);
- }
- gameObject4.GetComponentInChildren<Button>().onClick.AddListener(delegate ()
- {
- //mainMenuMode.TransitionTo(MainMenuMode.State.Menu);
- SfxSystem.PlayUiCancel();
- Console.WriteLine("Multiplayer Clicked");
- });
- ((Transform)obj).localPosition += new Vector3(-140f, 0f, 0f);
- }
- if (((Transform)obj).gameObject.name.Contains("Mode"))
- {
- ((Transform)obj).localScale = new Vector3(0.8f, 0.8f, 0.8f);
- }
- if (((Transform)obj).gameObject.name.Equals("CreativeMode"))
- {
- ((Transform)obj).localPosition += new Vector3(70f, 0f, 0f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement