Ejemplo n.º 1
0
 void Drag(UserEvent callBack, UserAction action, Vector2 v)
 {
     if (drawModel == DrawModel.Brush)
     {
         CurPos = callBack.ScreenToLocal(action.CanPosition);
         float hx = Width * 0.5f;
         float hy = Height * 0.5f;
         if (LastPos.x <= hx & LastPos.x >= -hx)
         {
             if (LastPos.y <= hy & LastPos.y >= -hy)
             {
                 Vector3 a = LastPos;
                 Vector3 b = CurPos;
                 ThreadMission.AddMission((o) => { DrawLine(a, b); }, null, null, Apply);
                 LastPos = CurPos;
             }
         }
     }
 }
Ejemplo n.º 2
0
 void PointDown(UserEvent callBack, UserAction action)
 {
     Origin  = callBack.ScreenToLocal(action.CanPosition);
     LastPos = Origin;
     loopBuffer.Clear();
 }