Beispiel #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();
        }