예제 #1
0
        void UpdateMouseButtons(bool mouseUsable)
        {
            #region Left Click

            if (Input.GetMouseButtonDown(0) && mouseUsable)
            {
                OnCursorDown.Invoke(cursorTile);
                validCursor = true;
            }

            if (Input.GetMouseButtonUp(0))
            {
                OnCursorUp.Invoke(cursorTile);
                validCursor = false;
            }

            if (Input.GetMouseButton(0) && !lastTile.Equals(mouseTile) && mouseUsable && validCursor)
            {
                lastTile = mouseTile;
                OnCursorMoveHold.Invoke(cursorTile);
            }
            #endregion
        }
예제 #2
0
 public virtual void OnCursorExit(CursorBehaviour cursor)
 {
     //Debug.Log("Exit");
     CursorExitEvent.Invoke(cursor);
 }
예제 #3
0
 public virtual void OnCursorOver(CursorBehaviour cursor)
 {
     //Debug.Log("Over");
     CursorOverEvent.Invoke(cursor);
 }
예제 #4
0
 public virtual void OnCursorBButton(CursorBehaviour cursor)
 {
     //Debug.Log("B");
     CursorBButtonEvent.Invoke(cursor);
 }