Exemplo n.º 1
0
        public void TemplateComboBox_SelectionChanged(object sender, RoutedEventArgs e)
        {
            Template         template = GameState.GetLevel().Templates[TemplateComboBox.SelectedValue.ToString()];
            TemplateInstance instance = new TemplateInstance(template);

            entity.AddTemplate(instance);

            entity.ReloadTemplates();
            entity.ReloadMovement();

            TemplatePanel panel = new TemplatePanel(entity, instance);

            TemplatePanels.Children.Add(panel);

            entity.ForceNewPanel = true;
            GameState.Get().ReloadEntity(entity);
            GameState.Get().TextEditWindow.DrawLoadablePanels();
        }
        public void UpdatePosition(object sender, RoutedEventArgs e)
        {
            template.SetParameter(firstTarget, TextboxXPosition.Text);
            template.SetParameter(firstTarget + 1, TextboxYPosition.Text);

            ent.ReloadTemplates();
            ent.ReloadMovement();

            GameState.Get().MainWindow.UpdateEntityView(true);
        }