home *** CD-ROM | disk | FTP | other *** search
- t += "0.1";
- xx = eval("Ball:_scale");
- zaman += "1";
- tikx = getProperty("tik", _X);
- tiky = getProperty("tik", _Y);
- if("5" < zaman)
- {
- zaman = "0";
- oldtiky = getProperty("tik", _Y);
- oldtikx = getProperty("tik", _X);
- saydir = "0";
- }
- if(Dragging)
- {
- oldx = x;
- oldy = y;
- x = getProperty("Ball", _X);
- y = getProperty("Ball", _Y);
- vx = (x - oldx) * "10";
- vy = (y - oldy) * "10";
- }
- else
- {
- vy += g / "10";
- x += vx / "10";
- y += vy / "10";
- if(y < BallRadius)
- {
- y = BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- }
- if("300" - BallRadius < y)
- {
- y = "300" - BallRadius;
- vx *= elastic;
- vy = - vy * elastic;
- count = "0";
- }
- if(x < BallRadius)
- {
- x = BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- count = "0";
- }
- if("400" - BallRadius < x)
- {
- x = "400" - BallRadius;
- vx = - vx * elastic;
- vy *= elastic;
- }
- if(tiky - BallRadius < y and y < tiky + BallRadius and x < tikx + getProperty("tik", _width) / "2" and tikx - getProperty("tik", _width) / "2" < x)
- {
- y = tiky - BallRadius;
- vx = vx * elastic + (tikx - oldtikx) * "2";
- vy = - vy * elastic + (tiky - oldtiky) * "3";
- saydir = "1";
- tellTarget("tik")
- {
- play();
- }
- if(int(vy) == int(oldvy) or int(oldvx) == int(vx))
- {
- count = "0";
- }
- oldvy = vy;
- oldvx = vx;
- }
- if(saydir == "1")
- {
- count += "1";
- saydir = "0";
- if(best < count)
- {
- best = count;
- }
- }
- setProperty("Ball", _X, x);
- setProperty("Ball", _Y, y);
- }
-