// Use this for initialization void Start() { //DontDestroyOnLoad(gameObject); playerHealths = GameObject.FindObjectsOfType <PlayerHealth>(); Physics.gravity = new Vector3(0, -100.0F, 0); failScript = EventSystem.GetComponent <FailMenu>(); }
/// <summary> /// Instantiates Menu_Manager and setups the menu item positions. /// </summary> /// <param name="graphics"></param> public Menu_Manager(GraphicsDeviceManager graphics) { CenterPos = new Vector2(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2); menu_item1_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y - 100); menu_item2_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y - 50); menu_item3_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 0); menu_item4_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 50); menu_item5_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 100); New_menu_item1_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y - 50); New_menu_item2_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 0); aboutmenu = new AboutMenu(CenterPos); optionsmenu = new OptionsMenu(CenterPos); helpmenu = new HelpMenu(CenterPos); failmenu = new FailMenu(CenterPos); }