s

부드러운 움직임 2

· 17년 전 · 1882

//관성력
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에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
17년 전 조회 1,402
17년 전 조회 1,495
17년 전 조회 1,290
17년 전 조회 1,334
17년 전 조회 1,364
17년 전 조회 1,429
17년 전 조회 1,445
17년 전 조회 1,479
17년 전 조회 1,430
17년 전 조회 1,769
17년 전 조회 3,085
17년 전 조회 3,481
17년 전 조회 1,582
17년 전 조회 1,670
17년 전 조회 1,473
17년 전 조회 2,247
17년 전 조회 3,159
17년 전 조회 1,502
17년 전 조회 1,472
17년 전 조회 1,498
17년 전 조회 1,368
17년 전 조회 1,556
17년 전 조회 1,617
17년 전 조회 1,425
17년 전 조회 2,686
17년 전 조회 1,448
17년 전 조회 1,709
17년 전 조회 1,590
17년 전 조회 1,900
17년 전 조회 1,915
17년 전 조회 1,923
17년 전 조회 1,990
17년 전 조회 1,650
17년 전 조회 1,712
17년 전 조회 1,636
17년 전 조회 1,971
17년 전 조회 1,898
17년 전 조회 1,682
17년 전 조회 1,876
17년 전 조회 1,529
17년 전 조회 1,766
17년 전 조회 2,078
17년 전 조회 2,914
17년 전 조회 2,131
17년 전 조회 1,519
17년 전 조회 2,093
17년 전 조회 2,530
17년 전 조회 1,679
17년 전 조회 2,431
17년 전 조회 1,883
17년 전 조회 1,587
17년 전 조회 1,428
17년 전 조회 2,101
17년 전 조회 3,023
17년 전 조회 2,632
17년 전 조회 1,642
17년 전 조회 3,022
17년 전 조회 2,545
17년 전 조회 2,890
17년 전 조회 2,907
17년 전 조회 2,673
17년 전 조회 2,501
17년 전 조회 1,856
17년 전 조회 2,583
17년 전 조회 4,099
17년 전 조회 1,948
17년 전 조회 4,038
17년 전 조회 1,964
17년 전 조회 1,852
17년 전 조회 2,194
17년 전 조회 2,624
17년 전 조회 1,562
17년 전 조회 1,909
17년 전 조회 2,476
17년 전 조회 1,955
17년 전 조회 1,909
17년 전 조회 1,697
17년 전 조회 1,528
17년 전 조회 1,489
17년 전 조회 1,302
17년 전 조회 1,290
17년 전 조회 1,315
17년 전 조회 1,317
17년 전 조회 1,721
17년 전 조회 1,819
17년 전 조회 1,967
17년 전 조회 3,085
17년 전 조회 2,239
17년 전 조회 1,896
17년 전 조회 2,242
17년 전 조회 1,955
17년 전 조회 3,495
17년 전 조회 1,668
17년 전 조회 1,779
17년 전 조회 1,493
17년 전 조회 2,331
17년 전 조회 3,263
17년 전 조회 2,407
17년 전 조회 1,861
17년 전 조회 3,117