Esempio n. 1
0
        void MakeSingleLine(QuadLine quad)
        {
            bool result = quad.AttachLineToMouse(lastMousePosition);

            if (result)
            {
                lastConnectedQuad   = quad;
                lineAttachedToMouse = true;
            }
        }
Esempio n. 2
0
        void MakeConnectedLine(QuadLine quad)
        {
            bool result = quad.ConnectWithQuad(1, lastConnectedQuad);

            if (result)
            {
                lineAttachedToMouse = false;
                lastConnectedQuad.ConnectWithQuad(0, quad);
                lastConnectedQuad = null;
            }
        }
Esempio n. 3
0
        void MakeLineBetweenQuads(QuadLine quad)
        {
            if (lastConnectedQuad == quad)
            {
                return;
            }

            if (lastConnectedQuad == null)
            {
                MakeSingleLine(quad);
            }
            else
            {
                MakeConnectedLine(quad);
            }
        }
Esempio n. 4
0
 void DeleteSingleLine()
 {
     lastConnectedQuad.DeleteLine();
     lastConnectedQuad   = null;
     lineAttachedToMouse = false;
 }