Supermarket.Hand.Update C# (CSharp) Méthode

Update() private méthode

private Update ( ) : void
Résultat void
        void Update()
        {
            MoveToCursor();

            // If cursor not over UI
            if (!UnityEngine.EventSystems.EventSystem.current.IsPointerOverGameObject())
            {
                //if left moose button has been clicked
                if (Input.GetMouseButtonDown(0))
                {
                    //drop staff like its hot
                    Drop();
                }
                // If right moose button down
                else if (Input.GetMouseButtonDown(1))
                {
                    if (cancelCallback != null)
                    {
                        cancelCallback();

                        Clear();
                        Disable();
                    }
                }
            }
        }