public void Init(SegmentSequence sequence, SegmentSequenceEditor editor) { this.sequence = sequence; this.editor = editor; minSize = maxSize = new Vector2(250f, 250f); titleContent = new GUIContent("Sequence Settings"); Repaint(); }
public void Init(LevelGenerator gen, int index) { generator = gen; levelIndex = index; white = new Texture2D(1, 1); white.SetPixel(0, 0, Color.white); settingsPanel = new WindowPanel(200, 9000f, "Level Settings", this, SettingsUI); sequenceEditor = new SegmentSequenceEditor(generator, generator.levels[levelIndex].sequenceCollection, position); sequenceEditor.onWillChange -= RecordUndo; sequenceEditor.onChanged -= OnChanged; sequenceEditor.onApplySequences -= OnApplySequences; sequenceEditor.onWillChange += RecordUndo; sequenceEditor.onChanged += OnChanged; sequenceEditor.onApplySequences += OnApplySequences; titleContent = new GUIContent("Level Window - " + generator.levels[levelIndex].title); }