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 }
public virtual void OnCursorExit(CursorBehaviour cursor) { //Debug.Log("Exit"); CursorExitEvent.Invoke(cursor); }
public virtual void OnCursorOver(CursorBehaviour cursor) { //Debug.Log("Over"); CursorOverEvent.Invoke(cursor); }
public virtual void OnCursorBButton(CursorBehaviour cursor) { //Debug.Log("B"); CursorBButtonEvent.Invoke(cursor); }