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(); } } } } }
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>(); }
protected void AboveClosed() { editingCircuit = null; aboveEditor = null; state = EditorState.IDEAL; }