Beispiel #1
0
        public virtual void OnSceneViewGUI(SceneView view, MazeCreationWorkflowBackEnd backend, EditorViewGridVisualisation visual)
        {
            visual.pushHandleColor();

            Handles.color = tileHighlighting;

            visual.popHandleColor();
        }
Beispiel #2
0
        private void OnEnable()
        {
            Instance = this;

            LoadEditorModeOptions();

            visual = new EditorViewGridVisualisation();

            SceneView.onSceneGUIDelegate -= onSceneGUI;
            SceneView.onSceneGUIDelegate += onSceneGUI;

            EditorApplication.update -= onEditorApplicationUpdate;
            EditorApplication.update += onEditorApplicationUpdate;
        }
Beispiel #3
0
        private void OnEnable()
        {
            log("Workflow Enabled");

            var availableBackend = FindOrCreateBackend();

            if (backend != null && backend.GetInstanceID() != availableBackend.GetInstanceID())
            {
                log("Found old backend - destroy it...");
                DestroyImmediate(backend);
                backend = null;
            }

            backend = availableBackend;

            backend.CheckCurrentSelection();
        }
Beispiel #4
0
        public virtual void ProcessEvent(Event evt, MazeCreationWorkflowBackEnd backend, EditorViewGridVisualisation visual)
        {
            if (backend == null)
            {
                Debug.Log("backend null");
            }

            this.backend = backend;

            controlId = GUIUtility.GetControlID(FocusType.Passive);

            if (evt.type == EventType.MouseDown)
            {
                if (dragging)
                {
                    DragEnds();
                }

                Click(evt, evt.button);
            }

            if (evt.type == EventType.MouseDrag)
            {
                Drag(evt, evt.button);
            }

            if (evt.type == EventType.MouseUp)
            {
                if (dragging)
                {
                    DragEnds();
                }

                Click(evt, evt.button);
            }
        }
Beispiel #5
0
 public virtual void OnGUI(MazeCreationWorkflowBackEnd backend)
 {
     EditorGUILayout.HelpBox(Name, MessageType.Info);
 }