static void HandleInputMouse(ref Vector3 move)
{
if (move.magnitude < minMovMagnitudeMouse)
{
if (TouchHandler != null)
{
TouchHandler(null, new TouchArgs() { TouchType = TouchEvent.SingleTap });
}
}
else
{
move.Normalize();
// Left/Right
if (Mathf.Abs(move.x) > Mathf.Abs(move.y))
{
if (move.x > 0.0f)
{
if (TouchHandler != null)
{
TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Left });
}
}
else
{
if (TouchHandler != null)
{
TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Right });
}
}
}
// Up/Down
else
{
if (move.y > 0.0f)
{
if (TouchHandler != null)
{
TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Down });
}
}
else
{
if(TouchHandler != null)
{
TouchHandler(null, new TouchArgs () { TouchType = TouchEvent.Up });
}
}
}
}
}
}