コード例 #1
0
 public InputComponentControl(Entity entity)
 {
     InitializeComponent();
     engineData     = new List <FFComponent>();
     selectedEntity = entity;
     actions        = new Dictionary <string, MakerSquare.FrontFacingECS.Tuple <string, string, string> >();
     basePanel      = DeepCopy <StackPanel> .DeepCopyMethod(ActionPanel);
 }
コード例 #2
0
        public void SetComponentData(Entity entity)
        {
            var component = new InputComponentControl(entity);

            for (int i = 1; i < actions.Count; i++)
            {
                component.KeyActionsPanel.Children.Add(DeepCopy <StackPanel> .DeepCopyMethod(component.ActionPanel));
            }

            int actionPanel = 0;

            foreach (var action in actions)
            {
                AddAction(actionPanel, action, component);
                actionPanel++;
            }

            entity.AddComponent(component);
        }
コード例 #3
0
 private void AddActionButtonClick(object sender, RoutedEventArgs e)
 {
     KeyActionsPanel.Children.Add(DeepCopy <StackPanel> .DeepCopyMethod(basePanel));
 }