예제 #1
0
 public void Translation(Vector2 offset)
 {
     if (utils.PositionInView(Input.mousePosition) && offset != Vector2.zero)
     {
         viewer.Translate(new Vector2D(offset.x, offset.y));
     }
 }
예제 #2
0
    public override void OnButton()
    {
        var dis = new Vector3(originalPos.x, originalPos.y, 0) - Input.mousePosition;

        viewer.Translate(new Vector2D(dis.x, dis.y));
        originalPos = Input.mousePosition;
    }