void Update()
        {
            if (!Active)
            {
                return;
            }

            if (!CameraControler.IsInputFieldFocused())
            {
                if (AllowRemove && Input.GetKeyDown(KeyCode.Delete))
                {
                    DestroySelectedObjects();
                }

                if (Input.GetKeyDown(KeyCode.C) && Input.GetKey(KeyCode.LeftControl))
                {
                    //Copy
                    CopyAction?.Invoke();
                }
                else if (Input.GetKeyDown(KeyCode.V) && Input.GetKey(KeyCode.LeftControl))
                {
                    //Paste
                    PasteAction?.Invoke();
                }
                else if (Input.GetKeyDown(KeyCode.D) && Input.GetKey(KeyCode.LeftControl))
                {
                    //Duplicate
                    DuplicateAction?.Invoke();
                }
            }
        }
 public static void ExecuteCopyAction()
 {
     if (Current.Active && !CameraControler.IsInputFieldFocused())
     {
         CopyAction?.Invoke();
     }
 }
Esempio n. 3
0
        private void btnCoppy_Click(object sender, EventArgs e)
        {
            Button button = sender as Button;

            if (button.Name == btnCoppyCross.Name)
            {
                CopyAction?.Invoke(CanvasType.Cross);
            }
            if (button.Name == btnCoppyCircle.Name)
            {
                CopyAction?.Invoke(CanvasType.Circle);
            }
            if (button.Name == btCoppyBlank.Name)
            {
                CopyAction?.Invoke(CanvasType.Blank);
            }
        }