private static Quadrant getQuadrant(Vector3 pos)
{
Vector3 screenPos = _instance.uiCamera.WorldToScreenPoint(pos);
bool top = screenPos.y > _instance.uiCamera.pixelHeight/2;
bool left = screenPos.x < _instance.uiCamera.pixelWidth/2;
if (top)
{
if (left)
return Quadrant.TOP_LEFT;
else
return Quadrant.TOP_RIGHT;
}
else
{
if (left)
return Quadrant.BOTTOM_LEFT;
else
return Quadrant.BOTTOM_RIGHT;
}
}