s

부드러운 움직임 2

· 17년 전 · 2123

//관성력
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,607
17년 전 조회 1,707
17년 전 조회 1,505
17년 전 조회 1,538
17년 전 조회 1,572
17년 전 조회 1,663
17년 전 조회 1,666
17년 전 조회 1,702
17년 전 조회 1,637
17년 전 조회 1,988
17년 전 조회 3,295
17년 전 조회 3,703
17년 전 조회 1,781
17년 전 조회 1,896
17년 전 조회 1,679
17년 전 조회 2,441
17년 전 조회 3,369
17년 전 조회 1,698
17년 전 조회 1,680
17년 전 조회 1,713
17년 전 조회 1,577
17년 전 조회 1,757
17년 전 조회 1,817
17년 전 조회 1,638
17년 전 조회 2,898
17년 전 조회 1,666
17년 전 조회 1,917
17년 전 조회 1,804
17년 전 조회 2,132
17년 전 조회 2,127
17년 전 조회 2,136
17년 전 조회 2,209
17년 전 조회 1,888
17년 전 조회 1,933
17년 전 조회 1,847
17년 전 조회 2,190
17년 전 조회 2,116
17년 전 조회 1,894
17년 전 조회 2,095
17년 전 조회 1,752
17년 전 조회 1,979
17년 전 조회 2,301
17년 전 조회 3,129
17년 전 조회 2,350
17년 전 조회 1,740
17년 전 조회 2,310
17년 전 조회 2,762
17년 전 조회 1,890
17년 전 조회 2,660
17년 전 조회 2,124
17년 전 조회 1,827
17년 전 조회 1,650
17년 전 조회 2,329
17년 전 조회 3,261
17년 전 조회 2,851
17년 전 조회 1,862
17년 전 조회 3,250
17년 전 조회 2,770
17년 전 조회 3,123
17년 전 조회 3,131
17년 전 조회 2,905
17년 전 조회 2,726
17년 전 조회 2,071
17년 전 조회 2,807
17년 전 조회 4,339
18년 전 조회 2,175
18년 전 조회 4,273
18년 전 조회 2,188
18년 전 조회 2,075
18년 전 조회 2,440
18년 전 조회 2,840
18년 전 조회 1,790
18년 전 조회 2,142
18년 전 조회 2,710
18년 전 조회 2,190
18년 전 조회 2,128
18년 전 조회 1,922
18년 전 조회 1,755
18년 전 조회 1,732
18년 전 조회 1,516
18년 전 조회 1,535
18년 전 조회 1,537
18년 전 조회 1,544
18년 전 조회 1,944
18년 전 조회 2,059
18년 전 조회 2,182
18년 전 조회 3,323
18년 전 조회 2,475
18년 전 조회 2,121
18년 전 조회 2,477
18년 전 조회 2,204
18년 전 조회 3,731
18년 전 조회 1,880
18년 전 조회 2,016
18년 전 조회 1,714
18년 전 조회 2,573
18년 전 조회 3,500
18년 전 조회 2,616
18년 전 조회 2,087
18년 전 조회 3,348