s

부드러운 움직임 2

· 17년 전 · 1767

//관성력
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,275
17년 전 조회 1,391
17년 전 조회 1,164
17년 전 조회 1,214
17년 전 조회 1,250
17년 전 조회 1,320
17년 전 조회 1,340
17년 전 조회 1,363
17년 전 조회 1,320
17년 전 조회 1,641
17년 전 조회 2,969
17년 전 조회 3,370
17년 전 조회 1,460
17년 전 조회 1,557
17년 전 조회 1,365
17년 전 조회 2,121
17년 전 조회 3,041
17년 전 조회 1,383
17년 전 조회 1,377
17년 전 조회 1,375
17년 전 조회 1,238
17년 전 조회 1,429
17년 전 조회 1,489
17년 전 조회 1,299
17년 전 조회 2,582
17년 전 조회 1,328
17년 전 조회 1,594
17년 전 조회 1,472
17년 전 조회 1,778
17년 전 조회 1,796
17년 전 조회 1,817
17년 전 조회 1,870
17년 전 조회 1,533
17년 전 조회 1,612
17년 전 조회 1,525
17년 전 조회 1,864
17년 전 조회 1,770
17년 전 조회 1,568
17년 전 조회 1,750
17년 전 조회 1,413
17년 전 조회 1,648
17년 전 조회 1,962
17년 전 조회 2,796
17년 전 조회 2,003
17년 전 조회 1,409
17년 전 조회 1,966
17년 전 조회 2,421
17년 전 조회 1,582
17년 전 조회 2,336
17년 전 조회 1,768
17년 전 조회 1,471
17년 전 조회 1,329
17년 전 조회 2,002
17년 전 조회 2,898
17년 전 조회 2,516
17년 전 조회 1,534
17년 전 조회 2,885
17년 전 조회 2,419
17년 전 조회 2,769
17년 전 조회 2,782
17년 전 조회 2,559
17년 전 조회 2,377
17년 전 조회 1,731
17년 전 조회 2,470
17년 전 조회 3,961
17년 전 조회 1,839
17년 전 조회 3,924
17년 전 조회 1,853
17년 전 조회 1,745
17년 전 조회 2,082
17년 전 조회 2,485
17년 전 조회 1,440
17년 전 조회 1,783
17년 전 조회 2,349
17년 전 조회 1,819
17년 전 조회 1,767
17년 전 조회 1,554
17년 전 조회 1,401
17년 전 조회 1,354
17년 전 조회 1,164
17년 전 조회 1,159
17년 전 조회 1,187
17년 전 조회 1,192
17년 전 조회 1,613
17년 전 조회 1,690
17년 전 조회 1,830
17년 전 조회 2,963
17년 전 조회 2,107
17년 전 조회 1,777
17년 전 조회 2,113
17년 전 조회 1,827
17년 전 조회 3,362
17년 전 조회 1,543
17년 전 조회 1,669
17년 전 조회 1,383
17년 전 조회 2,197
17년 전 조회 3,142
17년 전 조회 2,281
17년 전 조회 1,740
17년 전 조회 2,995