Beispiel #1
0
    void GlobalKeybinds()
    {
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            workflowToggle.UpdateWorkflowGroup();
        }
        if (CtrlHeld)
        {
            if (Input.GetKeyDown(KeyCode.S) && !Input.GetMouseButton(1))
            {
                autosave.Save();
            }
            if (Input.GetKeyDown(KeyCode.Alpha1))
            {
                laserSpeed.text = "1";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha2))
            {
                laserSpeed.text = "2";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha3))
            {
                laserSpeed.text = "3";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha4))
            {
                laserSpeed.text = "4";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha5))
            {
                laserSpeed.text = "5";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha6))
            {
                laserSpeed.text = "6";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha7))
            {
                laserSpeed.text = "7";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha8))
            {
                laserSpeed.text = "8";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha9))
            {
                laserSpeed.text = "9";
            }
            else if (Input.GetKeyDown(KeyCode.Alpha0))
            {
                laserSpeed.text = "0";
            }

            if (Input.GetKeyDown(KeyCode.Z) || (ShiftHeld && Input.GetKeyDown(KeyCode.Y)))
            {
                actionContainer.Undo();
            }
            else if (Input.GetKeyDown(KeyCode.Y) || (ShiftHeld && Input.GetKeyDown(KeyCode.Z)))
            {
                actionContainer.Redo();
            }


            if (Input.GetKeyDown(KeyCode.V) && SelectionController.HasCopiedObjects())
            {
                sc.Paste();
            }
        }
        if (Input.GetKeyDown(KeyCode.F11) && !Application.isEditor)
        {
            Screen.fullScreen = !Screen.fullScreen;
        }
        //if (Input.GetKeyDown(KeyCode.Z) || (ShiftHeld && Input.GetKeyDown(KeyCode.Y))) undoRedo.Undo();
        //if (Input.GetKeyDown(KeyCode.Y) || (ShiftHeld && Input.GetKeyDown(KeyCode.Z))) undoRedo.Redo();
    }