(version 2)
(include "sci.sh")
(use "Cycle")
(use "Obj")
(script 38)



(class ArrayPath of MoveTo
    (properties
        client 0
        caller 0
        x 0
        y 0
        dx 0
        dy 0
        {b-moveCnt} 0
        {b-i1} 0
        {b-i2} 0
        {b-di} 0
        {b-xAxis} 0
        {b-incr} 0
        completed 0
        xLast 0
        yLast 0
        value 0
        thePoints 0
    )

    (method (init theClient theThePoints theValue theCaller)
        (if (>= paramTotal 1)
            = client theClient
            = thePoints theThePoints
            (if (>= paramTotal 2)
                = value theValue
                (if (>= paramTotal 3)
                    = caller theCaller
                )
            )
        )
        (if (paramTotal)
            (self:setTarget())
        )
        (super:init())
    )


    (method (moveDone)
        (if (== proc999_6(thePoints value) -32768)
            (super:moveDone())
        )(else
            (self:
                setTarget()
                init()
            )
        )
    )


    (method (setTarget)
        (if (<> proc999_6(thePoints value) -32768)
            = x proc999_6(thePoints value)
            = y proc999_6(thePoints ++value)
            ++value
        )
    )


    (method (onTarget)
        return 
            (if (== (send client:x) x)
                == (send client:y) y
            )(else
                0
            )
    )

)
