s

부드러운 움직임 2

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

//관성력
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건
+
제목 글쓴이 날짜 조회
08-04-17 조회 4,391
08-03-14 조회 3,242
08-03-08 조회 3,065
08-03-06 조회 3,046
08-03-03 조회 4,339
08-02-20 조회 3,019
08-02-15 조회 3,930
08-02-11 조회 5,082
08-02-09 조회 5,819
08-02-05 조회 3,864
08-01-14 조회 6,669
08-01-11 조회 7,111
08-01-04 조회 1.1만
07-12-10 조회 5,006
07-12-10 조회 3,879
07-12-04 조회 3,417
07-11-29 조회 3,605
07-11-27 조회 3,951
07-11-23 조회 4,539
07-11-23 조회 4,277
07-11-13 조회 4,405
07-10-19 조회 4,873
07-10-17 조회 5,921
07-10-03 조회 5,090
07-10-02 조회 8,844
07-10-02 조회 4,498
07-09-09 조회 3,478
07-07-29 조회 4,364
07-07-28 조회 4,582
07-07-26 조회 4,484
07-06-19 조회 1.1만
07-06-17 조회 3,647
07-06-15 조회 4,143
07-05-31 조회 3,214
07-05-09 조회 5,366
07-05-04 조회 3,215
07-05-04 조회 3,556
07-04-28 조회 6,463
07-04-26 조회 4,707
07-04-14 조회 5,345
07-04-13 조회 3,770
07-04-12 조회 5,944
07-03-27 조회 3,891
07-03-19 조회 3,590
07-03-13 조회 4,664
07-03-07 조회 4,810
07-03-07 조회 3,323
07-02-25 조회 3,690
07-02-21 조회 4,580
07-02-18 조회 5,093
07-02-12 조회 3,449
07-02-02 조회 4,578
07-01-28 조회 6,197
07-01-27 조회 5,690
07-01-25 조회 4,062
07-01-21 조회 4,687
07-01-19 조회 6,617
07-01-19 조회 8,078
07-01-13 조회 3,549
07-01-09 조회 5,201
06-12-27 조회 3,589
06-11-24 조회 3,696
06-11-18 조회 4,206
06-10-17 조회 5,532
06-10-01 조회 4,447
06-09-26 조회 4,337
06-09-25 조회 4,668
06-09-25 조회 4,370
06-09-22 조회 4,901
06-09-22 조회 3,677
06-09-22 조회 4,526
06-09-13 조회 5,328
06-08-27 조회 4,932
06-08-26 조회 6,302
06-08-26 조회 5,618
06-08-23 조회 5,106
06-07-28 조회 7,212
06-07-24 조회 4,667
06-07-23 조회 5,452
06-07-21 조회 5,210
06-07-19 조회 3,100
06-07-19 조회 3,021
06-07-11 조회 3,660
06-07-11 조회 3,957
06-07-11 조회 4,551
06-07-11 조회 4,995
06-07-11 조회 3,612
06-07-11 조회 9,231
06-07-11 조회 4,088
06-07-11 조회 3,318
06-07-11 조회 3,369
06-07-11 조회 3,309
06-07-11 조회 3,103
06-07-07 조회 4,150
06-06-25 조회 4,496
06-06-15 조회 4,491
06-06-14 조회 4,979
06-06-11 조회 3,576
06-06-10 조회 3,954
06-06-09 조회 3,540