s

부드러운 움직임 2

· 2008-03-28 (금) 10:19:06 · 2905

//관성력
MovieClip.prototype.inertiaMove = function(widthX,heightY,g,fric){
        if(this._x + this.speedX > widthX - this._width/2){
                this.speedX = -1*this.speedX;
                this._x = widthX - this._width/2;
        }else if(this._x + speedX <0 + this._width/2){
                this.speedX = -1*this.speedX;
                this._x = 0 + this._width/2;
        }else{
                this._x += this.speedX ;
        }
        if(this._y + this.speedY > heightY - this._height/2){
                this.speedY = -1*this.speedY;
                this._y = heightY - this._height/2;
        }else if(this._y + this.speedY <0 + this._height/2){
                this.speedY = -1*this.speedY;
                this._y = 0 + this._height/2;
        }else{
                this._y += this.speedY;
        }
       
        this.speedY = this.speedY + g;
        this.speedX = fric*this.speedX;
        this.speedY = fric*this.speedY;
};

//포물선운동
MovieClip.prototype.parabolaMove = function(){
        this.vy = this.vy + this.g;
        this._x = this._x + this.vx;
        this._y = this._y + this.vy;
};

[이 게시물은 관리자님에 의해 2011-10-31 16:50:06 Flash에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
11-08-16 조회 2,438
11-08-16 조회 2,415
11-08-12 조회 2,261
11-08-02 조회 2,831
11-07-27 조회 2,219
11-07-25 조회 2,332
11-06-28 조회 2,521
11-06-06 조회 4,038
11-06-04 조회 2,620
11-04-25 조회 6,200
11-04-22 조회 2,694
11-04-21 조회 2,929
11-04-08 조회 3,339
11-03-31 조회 2,850
11-03-20 조회 3,276
11-03-10 조회 2,886
11-03-04 조회 3,202
11-03-03 조회 2,937
11-02-26 조회 4,366
11-02-14 조회 5,716
11-02-08 조회 3,321
11-01-30 조회 5,413
11-01-14 조회 5,211
11-01-14 조회 3,758
11-01-14 조회 2,905
11-01-14 조회 2,945
11-01-14 조회 3,094
11-01-12 조회 2,867
11-01-07 조회 4,518
10-12-29 조회 2,526
10-12-22 조회 2,487
10-12-05 조회 5,894
10-11-22 조회 5,254
10-11-13 조회 3,628
10-10-27 조회 3,235
10-10-21 조회 2,932
10-09-21 조회 2,939
10-09-17 조회 2,991
10-09-15 조회 3,433
10-09-14 조회 4,037
10-05-18 조회 2,927
10-02-17 조회 4,373
10-02-12 조회 3,128
09-12-14 조회 5,187
09-12-14 조회 6,057
09-09-19 조회 4,418
09-08-16 조회 6,266
09-07-22 조회 5,671
09-04-13 조회 3,074
09-03-15 조회 5,086
09-03-05 조회 3,912
09-02-09 조회 2,868
08-12-30 조회 3,051
08-12-06 조회 3,243
08-11-30 조회 3,589
08-10-18 조회 4,426
08-10-08 조회 3,817
08-09-19 조회 4,388
08-09-05 조회 3,021
08-09-05 조회 5,118
08-09-05 조회 2,998
08-09-05 조회 3,606
08-09-05 조회 3,506
08-09-01 조회 4,530
08-08-07 조회 2,784
08-06-08 조회 3,249
08-06-02 조회 2,849
08-05-26 조회 5,268
08-05-09 조회 4,329
08-04-22 조회 3,937
08-04-17 조회 4,512
08-04-17 조회 5,585
08-04-17 조회 3,730
08-04-17 조회 8,709
08-04-17 조회 4,627
08-04-17 조회 4,533
08-04-09 조회 3,083
08-03-31 조회 3,571
08-03-26 조회 3,283
08-03-25 조회 3,571
08-03-25 조회 3,991
08-03-25 조회 4,024
08-03-25 조회 3,690
08-03-25 조회 3,581
08-03-25 조회 3,587
08-03-25 조회 5,273
08-02-03 조회 5,356
08-01-18 조회 6,652
08-01-17 조회 3,945
08-01-17 조회 3,764
08-01-12 조회 4,066
08-01-08 조회 3,376
07-12-28 조회 4,657
07-12-04 조회 3,533
07-11-30 조회 5,145
07-11-30 조회 5,741
07-11-02 조회 4,041
07-10-24 조회 4,024
07-10-24 조회 3,299
07-10-24 조회 3,409