Beispiel #1
0
        public void moveBall(ball ball, JsAction callback)
        {
            startBottomItem self = this;
            var points = new JsArray<point>();
            points.push(new point {x = xMed, y = yMed, inSide = ESlide.center});
            for (int y = yMed; y < yMax; ++y)
            {
                points.push(new point {x = xMed, y = y});
            }
            points.push(new point {x = xMed, y = yMax, inSide = ESlide.bottom});
            points = points.reverse();

            HtmlElement div = getDiv();
            div.appendChild(ball.getDiv());
            _moveBallInternal(ball, points, callback);
        }
Beispiel #2
0
        public void moveBall(ball ball, JsAction callback)
        {
            topToRightItem self = this;

            var points = new JsArray<point>();
            points.push(new point {x = xMed, y = yMin, inSide = ESlide.top});

            for (int y = yMin + 1; y < yMed; ++y)
            {
                points.push(new point {x = xMed, y = y});
            }

            for (int x = xMed; x < xMax; ++x)
            {
                points.push(new point {x = x, y = yMed});
            }

            points.push(new point {x = xMax, y = yMed, inSide = ESlide.right});

            HtmlElement div = getDiv();
            if (ball.getInSide() == ESlide.top)
            {
                div.appendChild(ball.getDiv());
                points = points.reverse();
                _moveBallInternal(ball, points, callback);
            }
            else if (ball.getInSide() == ESlide.right)
            {
                div.appendChild(ball.getDiv());
                _moveBallInternal(ball, points, callback);
            }
            else
            {
                js.assert(false);
            }
        }
Beispiel #3
0
        public void moveBall(ball ball, JsAction callback)
        {
            startRightItem self = this;
            var points = new JsArray<point>();
            points.push(new point {x = xMed, y = yMed, inSide = ESlide.center});
            for (int x = xMed + 1; x < xMax; x++)
            {
                points.push(new point {x = x, y = yMed});
            }
            points.push(new point {x = xMax, y = yMed, inSide = ESlide.right});
            points = points.reverse();

            HtmlElement div = getDiv();
            div.appendChild(ball.getDiv());
            _moveBallInternal(ball, points, callback);
        }
Beispiel #4
0
        public void moveBall(ball ball, JsAction callback)
        {
            topToBottomItem self = this;

            var points = new JsArray<point>();
            points.push(new point {x = xMed, y = yMin, inSide = ESlide.top});

            for (int y = yMin + 1; y < yMax; ++y)
            {
                points.push(new point {x = xMed, y = y});
            }
            points.push(new point {x = xMed, y = yMax, inSide = ESlide.bottom});

            HtmlElement div = getDiv();
            if (ball.getInSide() == ESlide.top)
            {
                div.appendChild(ball.getDiv());
                points = points.reverse();
                _moveBallInternal(ball, points, callback);
            }
            else if (ball.getInSide() == ESlide.bottom)
            {
                div.appendChild(ball.getDiv());
                _moveBallInternal(ball, points, callback);
            }
        }