private async void ViewModel_NavigateToPage(object sender, AppNavigationEventArgs e) { InnerMenuGrid.FadeTo(0, 100); await MenuGrid.LayoutTo(new Rectangle(0, 0, Width, 0), 100, Easing.CubicOut); MenuGrid.FadeTo(0, 100); switch (e.Target) { case AppNavigation.Root: while (Navigation.NavigationStack.Count > 2) { Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]); } await Navigation.PopAsync(); break; case AppNavigation.Talents: await Navigation.PushAsync(new TalentsPage(ViewModel.SessionHandler)); break; case AppNavigation.NewDocument: await Navigation.PushAsync(new CreateDocumentPage(ViewModel.SessionHandler)); break; case AppNavigation.Documents: await Navigation.PushAsync(new DocumentsListPage(ViewModel.SessionHandler)); break; } }
private void MoveDown() { Body.TranslateTo(0, 200, 500, Easing.Linear); MenuGrid.TranslateTo(0, 100, 500, Easing.Linear); TitleLabel.ScaleTo(2, 500, Easing.Linear); ico.ScaleTo(1.5, 500, Easing.Linear); }
private void MoveUp() { Body.TranslateTo(0, 0, 500, Easing.Linear); MenuGrid.TranslateTo(0, 0, 500, Easing.Linear); TitleLabel.ScaleTo(1, 500, Easing.Linear); ico.ScaleTo(1, 500, Easing.Linear); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Cart"] == null) { CheckoutCart.Visible = false; CartHeaderLabel.Text = "You have nothing in cart!"; } else { CheckoutCart.Visible = true; CartHeaderLabel.Text = "Cart"; if (!Page.IsPostBack) { DataTable dt = new DataTable(); DataRow row; List <Pizza> list = (List <Pizza>)Session["Cart"]; dt.Columns.Add("Name"); dt.Columns.Add("Toppings"); dt.Columns.Add("Price"); for (int i = 0; i < list.Count; i++) { row = dt.NewRow(); row["Name"] = list[i].Name; row["Toppings"] = list[i].Toppings; row["Price"] = list[i].Price; dt.Rows.Add(row); } MenuGrid.DataSource = dt; MenuGrid.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["admin"].ToString() == "1") { DataTable dt = new DataTable(); DataRow row; dt.Columns.Add("ID"); dt.Columns.Add("Username"); dt.Columns.Add("Name"); dt.Columns.Add("Address"); dt.Columns.Add("Email"); dt.Columns.Add("Phone"); for (int i = 0; i < Dal.GetAllUserData().Count; i++) { row = dt.NewRow(); row["ID"] = Dal.GetAllUserData()[i].UserID; row["Username"] = Dal.GetAllUserData()[i].Username; row["Name"] = Dal.GetAllUserData()[i].Fullname; row["Address"] = Dal.GetAllUserData()[i].Address; row["Email"] = Dal.GetAllUserData()[i].Email; row["Phone"] = Dal.GetAllUserData()[i].Phone; dt.Rows.Add(row); } MenuGrid.DataSource = dt; MenuGrid.DataBind(); } else { Response.Redirect("Default.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataTable dt = new DataTable(); DataRow row; dt.Columns.Add("PizzaID"); dt.Columns.Add("Name"); dt.Columns.Add("Price"); for (int i = 0; i < manager.GetAllPizza().Count; i++) { row = dt.NewRow(); row["PizzaID"] = manager.GetAllPizza()[i].Id; row["Name"] = manager.GetAllPizza()[i].Name; row["Price"] = manager.GetAllPizza()[i].Price; dt.Rows.Add(row); } MenuGrid.DataSource = dt; MenuGrid.DataBind(); } if (Session["Username"] != null) { LoginPage.InnerText = "Logout"; } }
private async void ViewModel_RequestMenuClose(object sender, EventArgs e) { InnerMenuGrid.FadeTo(0, 500); await MenuGrid.LayoutTo(new Rectangle(0, 0, Width, 0), 400, Easing.Linear); MenuGrid.FadeTo(0, 100); }
private void BtnMainButtonsClick(object sender, RoutedEventArgs e) { int index = int.Parse(((Button)e.Source).Uid); Binding binding = new Binding(); switch (index) { case 0: GridCursor_index = 0; UsersData.Visibility = Visibility.Visible; AccountsData.Visibility = Visibility.Collapsed; FriendsData.Visibility = Visibility.Collapsed; StatisticsData.Visibility = Visibility.Collapsed; PermissionsData.Visibility = Visibility.Collapsed; break; case 1: GridCursor_index = 1; UsersData.Visibility = Visibility.Collapsed; AccountsData.Visibility = Visibility.Visible; FriendsData.Visibility = Visibility.Collapsed; StatisticsData.Visibility = Visibility.Collapsed; PermissionsData.Visibility = Visibility.Collapsed; break; case 2: GridCursor_index = 2; UsersData.Visibility = Visibility.Collapsed; AccountsData.Visibility = Visibility.Collapsed; FriendsData.Visibility = Visibility.Visible; StatisticsData.Visibility = Visibility.Collapsed; PermissionsData.Visibility = Visibility.Collapsed; break; case 3: GridCursor_index = 3; UsersData.Visibility = Visibility.Collapsed; AccountsData.Visibility = Visibility.Collapsed; FriendsData.Visibility = Visibility.Collapsed; StatisticsData.Visibility = Visibility.Visible; PermissionsData.Visibility = Visibility.Collapsed; break; case 4: GridCursor_index = 4; UsersData.Visibility = Visibility.Collapsed; AccountsData.Visibility = Visibility.Collapsed; FriendsData.Visibility = Visibility.Collapsed; StatisticsData.Visibility = Visibility.Collapsed; PermissionsData.Visibility = Visibility.Visible; break; } binding.Source = GridCursor_index; MenuGrid.SetBinding(Grid.ColumnProperty, binding); }
// Start is called before the first frame update public override void Init() { base.Init(); mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); mc = (MenuClases)Manager.Instance.GetMenu("MenuClases"); nombreInput.gameObject.SetActive(false); GetButton("Crear").OnPress += (() => Crear()); }
protected override void OnInit(Point2D position, object[] args) { widget = Session.Screen.MenuGrid; widget.Visible = true; foreach (var action in Session.Actions) { CreateMenuNode(action); } Session.Actions.CollectionChanged += OnActionCollectionChanged; }
public async void HeaderMenuToggle_OnClick(object sender, EventArgs e) { if (MenuGrid.TranslationY == 0) { //MenuGrid.TranslationY = -500; MenuGrid.HeightRequest = 0; MenuGrid.TranslateTo(0, -1000, 200); } else { //MenuGrid.TranslationY = 0; MenuGrid.HeightRequest = 1000; MenuGrid.TranslateTo(0, 0, 200); } if (MainContent.TranslationY < 1000) { // MainContent.TranslationY = 500; MainContent.HeightRequest = 0; MainContent.TranslateTo(0, 1000, 200); } else { //MainContent.TranslationY = 0; MainContent.HeightRequest = 1000; MainContent.TranslateTo(0, 0, 200); } //VisualStateManager.Bind(this.Parent.LogicalChildren.First(), StateManager); //var currentState = StateManager.CurrentState<MainMenuStates>(); //if (currentState == MainMenuStates.ShowMenu) //{ // await StateManager.GoToState(MainMenuStates.HideMenu); //} //else //{ // try // { // await StateManager.GoToState(MainMenuStates.ShowMenu); // } // catch (Exception exception) // { // Console.WriteLine(exception); // throw; // } //} }
private async void PrepareAnimate() { await MainImage.ScaleTo(3, 500, Easing.Linear); await Body.TranslateTo(0, 200, 50, Easing.Linear); await MenuGrid.TranslateTo(0, 100, 50, Easing.Linear); await TitleLabel.ScaleTo(2, 50, Easing.Linear); await ico.ScaleTo(1.5, 50, Easing.Linear); FlyImg(); }
private void ExpandBtn_Click(object sender, RoutedEventArgs e) { DoubleAnimation anim = new DoubleAnimation() { From = MenuGrid.ActualWidth, To = IsMenuExpanded ? 50 : 150, Duration = new Duration(TimeSpan.FromMilliseconds(200)), EasingFunction = new CubicEase() }; MenuGrid.BeginAnimation(WidthProperty, anim); IsMenuExpanded = !IsMenuExpanded; }
public void menuClose() { // var boshlash = new Thickness(0, 0, 0, 0); var tugatish = new Thickness(-280, 0, 0, 0); var da = new ThicknessAnimation(); da.From = boshlash; da.To = tugatish; da.Duration = TimeSpan.FromMilliseconds(200); MenuGrid.BeginAnimation(MarginProperty, da); // CloseMenu_Border.Visibility = Visibility.Collapsed; }
// Start is called before the first frame update public override void Init() { base.Init(); m = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); for (int i = 0; i < lines.Length; i++) { lines[i].indice = i; lines[i].Init(); } GetButton("Volver").OnPress += (() => Manager.Instance.Save()); }
public GameScreen() { escapeWindow = new EscapeWindow(RootWidget); escapeWindow.Visible = false; escapeWindow.Closed += () => escapeWindow.Visible = false; escapeWindow.Logout += Close; escapeWindow.Exit += App.Exit; Container = new Container(Root); // HACK: to display character selection screen nicely Container.Resize(800, 600); Container.Visible = false; MapView = new MapView(Root); MapView.Visible = false; Calendar = new Calendar(Root); Calendar.Visible = false; MenuGrid = new MenuGrid(Root); MenuGrid.Visible = false; HudMenu = new HudMenu(Root); HudMenu.Visible = false; Belt = new Belt(Root); Belt.Visible = false; Chat = new ChatWindow(Root); Chat.Resize(300, 200); Chat.Visible = false; CombatMeter = new CombatMeter(Root); CombatMeter.Visible = false; CombatView = new CombatView(Root); CombatView.Visible = false; CombatWindow = new CombatWindow(Root); CombatWindow.Move(100, 100); CombatWindow.Visible = false; Aim = new AimWidget(Root); Aim.Visible = false; RegisterHotkeys(); }
public void Init() { mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); mc = (MenuClases)Manager.Instance.GetMenu("MenuClases"); co = (CreadorObjetos)Manager.Instance.GetMenu("CreadorObjetos"); me = (MenuExplorar)Manager.Instance.GetMenu("MenuExplorar"); cv = (CreadorVariables)Manager.Instance.GetMenu("CreadorVariables"); ce = (ConfirmacionEliminarClase)Manager.Instance.GetMenu("ConfirmacionEliminarClase"); modificar.OnPress += (() => Modificar()); crearObjeto.OnPress += (() => CrearObjeto()); crearVariable.OnPress += (() => CrearVariable()); explorar.OnPress += (() => Explorar()); this.gameObject.SetActive(false); cube.Init(mainAnchor, this); }
public new void Init(CustomAnchor main) { base.Init(main); eo = (ExploracionObjeto)Manager.Instance.GetMenu("ExploracionObjeto"); mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); Interaction.OnGraspEnd += (() => Release()); material = cuerpo.material; IntVariable[] intVariables = GetComponentsInChildren <IntVariable>(); int indexVar = 0; int indexMet = 0; foreach (IntVariable k in variablesInt) { anchorsVariables[indexVar].gameObject.SetActive(true); k.Init(this, anchorsVariables[indexVar]); k.transform.position = anchorsVariables[indexVar].transform.position; indexVar++; } foreach (FloatVariable k in variablesFloat) { anchorsVariables[indexVar].gameObject.SetActive(true); k.Init(this, anchorsVariables[indexVar]); k.transform.position = anchorsVariables[indexVar].transform.position; indexVar++; } foreach (BoolVariable k in variablesBool) { anchorsVariables[indexVar].gameObject.SetActive(true); k.Init(this, anchorsVariables[indexVar]); k.transform.position = anchorsVariables[indexVar].transform.position; indexVar++; } foreach (MetodoBase k in metodos) { anchorsMetodo[indexMet].gameObject.SetActive(true); k.Init(this, anchorsMetodo[indexMet]); k.transform.position = anchorsMetodo[indexMet].transform.position; indexMet++; } textoPanelSuperior.text = "new " + "<#" + ColorUtility.ToHtmlStringRGB(material.color) + ">" + nombre + "</color><#000000FF>();</color>"; base.Init(main); }
public void Init(string nombre, string clase, CustomAnchor main, Material colorVariable, Material colorClase) { base.Init(main); eo = (ExploracionObjeto)Manager.Instance.GetMenu("ExploracionObjeto"); mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); c = (Consola)Manager.Instance.GetMenu("Consola"); this.nombre = nombre; this.clase = clase; this.colorVariable = colorVariable; this.colorClase = colorClase; this.nombreColor = "<#" + ColorUtility.ToHtmlStringRGB(colorVariable.color) + ">" + nombre + "</color>"; this.nombreColorClase = "<#" + ColorUtility.ToHtmlStringRGB(colorClase.color) + ">" + clase + "</color>"; objetoReferenciado = null; Interaction.OnGraspEnd += (() => Release()); textoPanelSuperior.text = nombreColorClase + " " + nombreColor + ";"; }
public override void Init() { base.Init(); p = (PanelIzquierdo)Manager.Instance.GetMenu("PanelIzquierdo"); m = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); mc = (MenuClases)Manager.Instance.GetMenu("MenuClases"); numberVariables = 0; numberMethods = 0; nombreInput.gameObject.SetActive(false); GetButton("Finalizar").OnPress += (() => End()); //localPosAM = GetButton("AñadirMetodo").transform.localPosition; //localPosAA = GetButton("AñadirVariable").transform.localPosition; }
/// <summary> /// Name DateFrom DateTo 三个条件为基础的条件,有其他条件可以在 相应的子类中扩展 /// </summary> /// <param name="pager"></param> /// <returns></returns> public ActionResult SearchMenu(MenuPager pager) { var sql = @"SELECT t1.[keyid] ,[C_Name] ,[C_Description] ,[C_ParentMenu] , ParentMenu ,[C_Controller] ,[C_Action] ,[C_CreatedDate] ,[C_UpdatedDate] FROM [DATA_MANAGE].[dbo].[tbl_Menu] t1 left join (select keyid, C_Name as ParentMenu from tbl_menu) as t2 on t1.C_parentMenu=t2.keyid"; var where = new StringBuilder(" where 1=1 "); if (!string.IsNullOrWhiteSpace(pager.Name)) { where.AppendLine("and Name like '%" + pager.Name + "%'"); } if (!string.IsNullOrWhiteSpace(pager.DateFrom)) { where.AppendLine(" and C_CreatedDate>'" + pager.DateFrom + "'"); } if (!string.IsNullOrWhiteSpace(pager.DateTo)) { where.AppendLine(" and C_CreatedDate<'" + pager.DateTo + "'"); } try { var service = Container.GetService <IMenuService>(); var menudtos = service.GetModelsByPage <MenuDto>(pager.pageSize, pager.pageIndex, sql + where); var menuinfos = MenuInfo.ConvertToMenuInfos(menudtos); var grid = new MenuGrid(); grid.rows = menuinfos; grid.total = service.GetTableCount(where.ToString()); return(Json(grid)); } catch (Exception ex) { ViewBag.Operation = ex.Message; return(View("Error")); } }
private void BtnMainButtonsClick(object sender, RoutedEventArgs e) { int index = int.Parse(((Button)e.Source).Uid); Binding binding = new Binding(); switch (index) { case 0: GridCursor_index = 0; HomePage.Visibility = Visibility.Visible; FriendsPage.Visibility = Visibility.Collapsed; StatisticPage.Visibility = Visibility.Collapsed; SettingsPage.Visibility = Visibility.Collapsed; break; case 1: GridCursor_index = 1; FriendsPage.Visibility = Visibility.Visible; StatisticPage.Visibility = Visibility.Collapsed; HomePage.Visibility = Visibility.Collapsed; SettingsPage.Visibility = Visibility.Collapsed; break; case 2: GridCursor_index = 2; StatisticPage.Visibility = Visibility.Visible; FriendsPage.Visibility = Visibility.Collapsed; HomePage.Visibility = Visibility.Collapsed; SettingsPage.Visibility = Visibility.Collapsed; break; case 3: GridCursor_index = 3; StatisticPage.Visibility = Visibility.Collapsed; FriendsPage.Visibility = Visibility.Collapsed; HomePage.Visibility = Visibility.Collapsed; SettingsPage.Visibility = Visibility.Visible; break; } binding.Source = GridCursor_index; MenuGrid.SetBinding(Grid.ColumnProperty, binding); }
protected async override void OnAppearing() { base.OnAppearing(); _pageActive = true; if (ViewModel != null) { ViewModel.GoBackPage += GoBack; ViewModel.ShowException += DisplayException; ViewModel.RequestMenuOpen += ViewModel_RequestMenuOpen; ViewModel.RequestMenuClose += ViewModel_RequestMenuClose; ViewModel.NavigateToPage += ViewModel_NavigateToPage; ViewModel.SendAppearing(); if (_content != null) { _content.SendAppearing(); } } InnerMenuGrid.FadeTo(0, 100); await MenuGrid.LayoutTo(new Rectangle(0, 0, Width, 0), 100, Easing.CubicOut); MenuGrid.FadeTo(0, 100); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DataTable dt = new DataTable(); DataRow row; dt.Columns.Add("PizzaID"); dt.Columns.Add("Name"); dt.Columns.Add("Toppings"); dt.Columns.Add("Price"); for (int i = 0; i < Dal.GetAllPizza().Count; i++) { row = dt.NewRow(); row["PizzaID"] = Dal.GetAllPizza()[i].PizzaID; row["Name"] = Dal.GetAllPizza()[i].Name; row["Toppings"] = Dal.GetAllPizza()[i].Toppings; row["Price"] = Dal.GetAllPizza()[i].Price; dt.Rows.Add(row); } MenuGrid.DataSource = dt; MenuGrid.DataBind(); } }
private void button1_Click(object sender, EventArgs e) { if (panel1.Visible) { string json = ""; if (menuValue != "Salad" && menuValue != "Drink") { MainCourse mainCourse = new MainCourse(); mainCourse = new MainCourse(); mainCourse.Name = NameBox.Text; mainCourse.Price = Convert.ToDouble(PriceBox.Text); mainCourse.Description = DescriptionTextBox.Text; mainCourse.HouseSpecial = HouseSpecialCheckBox.Checked; json = Newtonsoft.Json.JsonConvert.SerializeObject(mainCourse); } else if (menuValue == "Salad") { salad = new Salad(); salad.Name = NameBox.Text; salad.Price = Convert.ToDouble(PriceBox.Text); salad.Description = DescriptionTextBox.Text; salad.HouseSpecial = HouseSpecialCheckBox.Checked; salad.Topping = toppingBox.Text; json = Newtonsoft.Json.JsonConvert.SerializeObject(salad); } else if (menuValue == "Drink") { drink = new Drink(); drink.Name = NameBox.Text; drink.Price = Convert.ToDouble(PriceBox.Text); drink.Description = DescriptionTextBox.Text; drink.HouseSpecial = HouseSpecialCheckBox.Checked; drink.AgeRestricted = ageRestrictedCheckbox.Checked; json = Newtonsoft.Json.JsonConvert.SerializeObject(drink); } var httpWebRequest = (HttpWebRequest)WebRequest.Create(Properties.Settings.Default.backendHostname + "/" + menuValue + "/Restaurant/edit"); httpWebRequest.Headers["Authorization"] = "Basic " + AuthValue; httpWebRequest.Headers[char.ToLower(menuValue[0]) + menuValue.Substring(1) + "Name"] = old.Name; httpWebRequest.ContentType = "text/json"; httpWebRequest.Accept = "*/*"; httpWebRequest.Method = "POST"; try { httpWebRequest.ContentLength = Encoding.ASCII.GetBytes(json).Length; using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { streamWriter.Write(json); } var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); if (httpResponse.StatusCode.ToString() == "OK") { } } catch (System.Net.WebException error) { MessageBox.Show(error.ToString()); } panel1.Hide(); MenuGrid.Show(); button1.Text = "Choose"; getJsonMenu(); } else { DataGridViewRow row = MenuGrid.CurrentRow; if (menuValue != "Salad" && menuValue != "Drink") { MainCourse mainCourse = new MainCourse(); mainCourse.Name = (string)row.Cells["Name"].Value; mainCourse.Price = (double)row.Cells["Price"].Value; mainCourse.Description = (string)row.Cells["Description"].Value; mainCourse.HouseSpecial = (bool)row.Cells["Housespecial"].Value; old = mainCourse; NameBox.Text = mainCourse.Name; PriceBox.Text = (string)mainCourse.Price.ToString(); HouseSpecialCheckBox.Checked = mainCourse.HouseSpecial; DescriptionTextBox.Text = mainCourse.Description; } else if (menuValue == "Salad") { Salad mainCourse = new Salad(); mainCourse.Name = (string)row.Cells["Name"].Value; mainCourse.Price = (double)row.Cells["Price"].Value; mainCourse.Description = (string)row.Cells["Description"].Value; mainCourse.HouseSpecial = (bool)row.Cells["Housespecial"].Value; mainCourse.Topping = (string)row.Cells["Topping"].Value; old = mainCourse; NameBox.Text = mainCourse.Name; PriceBox.Text = (string)mainCourse.Price.ToString(); HouseSpecialCheckBox.Checked = mainCourse.HouseSpecial; DescriptionTextBox.Text = mainCourse.Description; toppingBox.Text = mainCourse.Topping; } else if (menuValue == "Drink") { Drink mainCourse = new Drink(); mainCourse.Name = (string)row.Cells["Name"].Value; mainCourse.Price = (double)row.Cells["Price"].Value; mainCourse.Description = (string)row.Cells["Description"].Value; mainCourse.HouseSpecial = (bool)row.Cells["Housespecial"].Value; mainCourse.AgeRestricted = (bool)row.Cells["AgeRestricted"].Value; old = mainCourse; NameBox.Text = mainCourse.Name; PriceBox.Text = (string)mainCourse.Price.ToString(); HouseSpecialCheckBox.Checked = mainCourse.HouseSpecial; DescriptionTextBox.Text = mainCourse.Description; ageRestrictedCheckbox.Checked = mainCourse.AgeRestricted; } panel1.Show(); MenuGrid.Hide(); button1.Text = "Submit"; } }
// Start is called before the first frame update void Start() { if (Instance == null) { Instance = this; } else { Destroy(this.gameObject); } languageControl.selectedLanguage = 1; languageControl.UpdateTextTranslation(); prefabsPivot = GameObject.FindGameObjectWithTag("PrefabPivot").transform; AssetBundle bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "objeto")); objetoBasePrefab = Instantiate(bundle.LoadAsset <GameObject>("ObjetoBasico"), new Vector3(400, 400, 400), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <ObjetoBase>(); bundle.Unload(false); bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "variable_objeto")); variableObjetoPrefab = Instantiate(bundle.LoadAsset <GameObject>("VariableObjeto"), new Vector3(500, 500, 500), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <VariableObjeto>(); bundle.Unload(false); bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "variables")); intVariablePrefab = Instantiate(bundle.LoadAsset <GameObject>("IntVariable"), new Vector3(700, 700, 700), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <IntVariable>(); floatVariablePrefab = Instantiate(bundle.LoadAsset <GameObject>("FloatVariable"), new Vector3(700, 700, 700), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <FloatVariable>(); boolVariablePrefab = Instantiate(bundle.LoadAsset <GameObject>("BoolVariable"), new Vector3(700, 700, 700), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <BoolVariable>(); bundle.Unload(false); bundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "metodos")); List <GameObject> metodos = bundle.LoadAllAssets <GameObject>().ToList(); foreach (GameObject g in metodos) { MetodoBase m = Instantiate(g, new Vector3(800, 800, 800), Quaternion.Euler(0, 0, 0), prefabsPivot).GetComponent <MetodoBase>(); metodosPrefab.Add(m.nombre, m); } bundle.Unload(false); menus = new Dictionary <string, CustomMenu>(); List <CustomMenu> menusList = FindObjectsOfType <CustomMenu>().ToList(); foreach (CustomMenu c in menusList) { menus.Add(c.name, c); } foreach (CustomMenu c in menus.Values) { c.Init(); } StringExtension.Init(); mg = (MenuGrid)GetMenu("MenuGrid"); mc = (MenuClases)GetMenu("MenuClases"); c = (Consola)GetMenu("Consola"); co = (CreadorObjetos)GetMenu("CreadorObjetos"); ca = (CreadorAtributos)GetMenu("CreadorAtributos"); cm = (CreadorMetodos)GetMenu("CreadorMetodos"); ini = (MenuInicio)GetMenu("MenuInicio"); aud = GetComponent <AudioSource>(); string path = Path.Combine(Application.streamingAssetsPath, "save.sv"); if (!File.Exists(path)) { ini.GetButton("Cargar").Blocked = true; } }
public static void Init() { mg = (MenuGrid)Manager.Instance.GetMenu("MenuGrid"); c = (CreadorObjetos)Manager.Instance.GetMenu("CreadorObjetos"); }
private async void ViewModel_RequestMenuOpen(object sender, EventArgs e) { InnerMenuGrid.FadeTo(1, 300); MenuGrid.FadeTo(1, 100); await MenuGrid.LayoutTo(new Rectangle(0, 0, Width, Height *0.75), 400, Easing.Linear); }
private async Task HideMenuGrid() { float widthToMove = (float)MenuGrid.ActualWidth; await MenuGrid.Offset(-widthToMove).StartAsync(); }
private async Task HideMenuGrid(float duration = 500) { float widthToMove = (float)MenuGrid.ActualWidth; await MenuGrid.Offset(-widthToMove, 0, duration).StartAsync(); }