Exemple #1
0
    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));
    }
Exemple #2
0
    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));
    }
Exemple #3
0
 public static bool IsActive(Rotate.Side side)
 {
     return(side == GetEngine().currentSide&& !GetEngine().isRotating);
 }