Beispiel #1
0
 protected void ActivateSelects(Vector2 pos)
 {
     if (IsPartOnPos(pos, out var n))
     {
         if (n is EditableCircuit c)
         {
             editingCircuit           = c;
             state                    = EditorState.OTHER_EDITOR_ABOVE;
             aboveEditor              = c.Editor;
             aboveEditor.parentEditor = this;
         }
         else
         {
             if (!selectedParts.Contains(n))
             {
                 n.ActivateImmediate();
             }
             else
             {
                 foreach (var s in selectedParts)
                 {
                     s.ActivateImmediate();
                 }
             }
         }
     }
 }
Beispiel #2
0
 public PartEditor()
 {
     childEditors  = new List <PartEditor>();
     parentEditor  = null;
     Enabled       = true;
     parts         = new List <Part>();
     tilemap       = new TileMap(parts, 16, 10);
     state         = EditorState.IDEAL;
     selectedParts = new List <Part>();
 }
Beispiel #3
0
 protected void AboveClosed()
 {
     editingCircuit = null;
     aboveEditor    = null;
     state          = EditorState.IDEAL;
 }