s

부드러운 움직임 2

· 17년 전 · 1931

//관성력
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,445
17년 전 조회 1,539
17년 전 조회 1,331
17년 전 조회 1,367
17년 전 조회 1,412
17년 전 조회 1,475
17년 전 조회 1,494
17년 전 조회 1,523
17년 전 조회 1,479
17년 전 조회 1,810
17년 전 조회 3,132
17년 전 조회 3,534
17년 전 조회 1,625
17년 전 조회 1,718
17년 전 조회 1,525
17년 전 조회 2,292
17년 전 조회 3,210
17년 전 조회 1,553
17년 전 조회 1,509
17년 전 조회 1,541
17년 전 조회 1,420
17년 전 조회 1,611
17년 전 조회 1,663
17년 전 조회 1,467
17년 전 조회 2,746
17년 전 조회 1,499
17년 전 조회 1,749
17년 전 조회 1,642
17년 전 조회 1,947
17년 전 조회 1,958
17년 전 조회 1,974
17년 전 조회 2,028
17년 전 조회 1,698
17년 전 조회 1,760
17년 전 조회 1,684
17년 전 조회 2,023
17년 전 조회 1,941
17년 전 조회 1,721
17년 전 조회 1,921
17년 전 조회 1,572
17년 전 조회 1,808
17년 전 조회 2,132
17년 전 조회 2,963
17년 전 조회 2,183
17년 전 조회 1,566
17년 전 조회 2,144
17년 전 조회 2,587
17년 전 조회 1,732
17년 전 조회 2,482
17년 전 조회 1,932
17년 전 조회 1,637
17년 전 조회 1,478
17년 전 조회 2,154
17년 전 조회 3,078
17년 전 조회 2,682
17년 전 조회 1,696
17년 전 조회 3,083
17년 전 조회 2,594
17년 전 조회 2,935
17년 전 조회 2,953
17년 전 조회 2,731
17년 전 조회 2,545
17년 전 조회 1,902
17년 전 조회 2,636
17년 전 조회 4,159
17년 전 조회 1,995
17년 전 조회 4,085
17년 전 조회 2,006
17년 전 조회 1,904
17년 전 조회 2,260
17년 전 조회 2,683
17년 전 조회 1,616
17년 전 조회 1,970
17년 전 조회 2,522
17년 전 조회 2,015
17년 전 조회 1,953
17년 전 조회 1,746
17년 전 조회 1,571
17년 전 조회 1,534
17년 전 조회 1,347
17년 전 조회 1,342
17년 전 조회 1,363
17년 전 조회 1,372
17년 전 조회 1,767
17년 전 조회 1,872
17년 전 조회 2,012
17년 전 조회 3,138
17년 전 조회 2,289
17년 전 조회 1,947
17년 전 조회 2,295
17년 전 조회 2,017
17년 전 조회 3,543
17년 전 조회 1,718
17년 전 조회 1,836
17년 전 조회 1,534
17년 전 조회 2,378
17년 전 조회 3,317
18년 전 조회 2,454
18년 전 조회 1,913
18년 전 조회 3,166