public static bool IsPressed(Bounds bounds, int mouseButtonCode, Rotate.Side side) { if (!Input.GetMouseButton(mouseButtonCode)) { return(false); } if (!IsActive(side)) { return(false); } Vector3 mousePos = GetMousePositionWorld(); return(bounds.Contains(mousePos)); }
public static bool IsClicked(Bounds bounds, int mouseButtonCode, Rotate.Side side) { if (!Input.GetMouseButtonDown(mouseButtonCode)) { return(false); } if (!IsActive(side)) { return(false); } Vector3 mousePos = Input.mousePosition; mousePos.z = 9.4f; mousePos = GetMainCamera().ScreenToWorldPoint(mousePos); return(bounds.Contains(mousePos)); }
public static bool IsActive(Rotate.Side side) { return(side == GetEngine().currentSide&& !GetEngine().isRotating); }