s

부드러운 움직임 2

· 17년 전 · 2127

//관성력
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,613
17년 전 조회 1,713
17년 전 조회 1,508
17년 전 조회 1,540
17년 전 조회 1,576
17년 전 조회 1,664
17년 전 조회 1,666
17년 전 조회 1,703
17년 전 조회 1,637
17년 전 조회 1,989
17년 전 조회 3,298
17년 전 조회 3,706
17년 전 조회 1,784
17년 전 조회 1,899
17년 전 조회 1,681
17년 전 조회 2,443
17년 전 조회 3,372
17년 전 조회 1,701
17년 전 조회 1,683
17년 전 조회 1,716
17년 전 조회 1,579
17년 전 조회 1,760
17년 전 조회 1,821
17년 전 조회 1,640
17년 전 조회 2,903
17년 전 조회 1,667
17년 전 조회 1,919
17년 전 조회 1,806
17년 전 조회 2,134
17년 전 조회 2,128
17년 전 조회 2,137
17년 전 조회 2,210
17년 전 조회 1,888
17년 전 조회 1,935
17년 전 조회 1,850
17년 전 조회 2,192
17년 전 조회 2,117
17년 전 조회 1,895
17년 전 조회 2,096
17년 전 조회 1,754
17년 전 조회 1,982
17년 전 조회 2,304
17년 전 조회 3,131
17년 전 조회 2,350
17년 전 조회 1,742
17년 전 조회 2,310
17년 전 조회 2,765
17년 전 조회 1,893
17년 전 조회 2,661
17년 전 조회 2,128
17년 전 조회 1,828
17년 전 조회 1,652
17년 전 조회 2,332
17년 전 조회 3,262
17년 전 조회 2,853
17년 전 조회 1,864
17년 전 조회 3,252
17년 전 조회 2,770
17년 전 조회 3,125
17년 전 조회 3,134
17년 전 조회 2,905
17년 전 조회 2,728
17년 전 조회 2,074
17년 전 조회 2,808
17년 전 조회 4,340
18년 전 조회 2,177
18년 전 조회 4,273
18년 전 조회 2,189
18년 전 조회 2,075
18년 전 조회 2,441
18년 전 조회 2,843
18년 전 조회 1,793
18년 전 조회 2,144
18년 전 조회 2,711
18년 전 조회 2,192
18년 전 조회 2,129
18년 전 조회 1,925
18년 전 조회 1,755
18년 전 조회 1,735
18년 전 조회 1,517
18년 전 조회 1,535
18년 전 조회 1,538
18년 전 조회 1,544
18년 전 조회 1,945
18년 전 조회 2,061
18년 전 조회 2,183
18년 전 조회 3,323
18년 전 조회 2,475
18년 전 조회 2,122
18년 전 조회 2,478
18년 전 조회 2,208
18년 전 조회 3,733
18년 전 조회 1,882
18년 전 조회 2,016
18년 전 조회 1,716
18년 전 조회 2,574
18년 전 조회 3,500
18년 전 조회 2,616
18년 전 조회 2,088
18년 전 조회 3,348