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);
        }
Exemplo n.º 3
0
        // Push updates to movementcommander and redraw
        public void UpdateCommand(object sender, RoutedEventArgs e)
        {
            int.TryParse(TickBox.Text, out int value);
            this.command.StartingTick = value;
            int.TryParse(DurationBox.Text, out this.command.Duration);
            double.TryParse(TotalBox.Text, out this.command.Total);


            entity.ReloadMovement();
            GameState.Get().MainWindow.UpdateEntityView(true);
        }
        // Push updates to movementcommander and redraw
        public void UpdateCommand(object sender, RoutedEventArgs e)
        {
            this.command.StartingTick = int.Parse(TickBox.Text);
            this.command.Duration     = int.Parse(DurationBox.Text);
            this.command.EndingSpeed  = double.Parse(EndSpeed.Text);

            if (entity is object)
            {
                entity.ReloadMovement();

                GameState.Get().MainWindow.UpdateEntityView(true);
            }
        }
 void AddButton_Click(object sender, RoutedEventArgs e)
 {
     entity.ReloadMovement();
     GameState.Get().MainWindow.UpdateEntityView(true);
     this.Close();
 }