コード例 #1
0
ファイル: NewEntity.xaml.cs プロジェクト: antikrem/mg_edit
        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();
        }