s

부드러운 움직임 2

· 17년 전 · 1863

//관성력
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,384
17년 전 조회 1,483
17년 전 조회 1,271
17년 전 조회 1,316
17년 전 조회 1,348
17년 전 조회 1,413
17년 전 조회 1,432
17년 전 조회 1,464
17년 전 조회 1,411
17년 전 조회 1,751
17년 전 조회 3,065
17년 전 조회 3,467
17년 전 조회 1,564
17년 전 조회 1,651
17년 전 조회 1,460
17년 전 조회 2,228
17년 전 조회 3,145
17년 전 조회 1,484
17년 전 조회 1,456
17년 전 조회 1,477
17년 전 조회 1,347
17년 전 조회 1,537
17년 전 조회 1,599
17년 전 조회 1,407
17년 전 조회 2,674
17년 전 조회 1,431
17년 전 조회 1,690
17년 전 조회 1,573
17년 전 조회 1,885
17년 전 조회 1,898
17년 전 조회 1,908
17년 전 조회 1,972
17년 전 조회 1,628
17년 전 조회 1,702
17년 전 조회 1,620
17년 전 조회 1,957
17년 전 조회 1,878
17년 전 조회 1,664
17년 전 조회 1,860
17년 전 조회 1,512
17년 전 조회 1,748
17년 전 조회 2,061
17년 전 조회 2,892
17년 전 조회 2,115
17년 전 조회 1,502
17년 전 조회 2,077
17년 전 조회 2,517
17년 전 조회 1,663
17년 전 조회 2,415
17년 전 조회 1,864
17년 전 조회 1,572
17년 전 조회 1,412
17년 전 조회 2,087
17년 전 조회 3,005
17년 전 조회 2,612
17년 전 조회 1,622
17년 전 조회 2,993
17년 전 조회 2,525
17년 전 조회 2,869
17년 전 조회 2,879
17년 전 조회 2,646
17년 전 조회 2,470
17년 전 조회 1,831
17년 전 조회 2,562
17년 전 조회 4,073
17년 전 조회 1,929
17년 전 조회 4,014
17년 전 조회 1,944
17년 전 조회 1,819
17년 전 조회 2,175
17년 전 조회 2,598
17년 전 조회 1,537
17년 전 조회 1,883
17년 전 조회 2,451
17년 전 조회 1,930
17년 전 조회 1,872
17년 전 조회 1,675
17년 전 조회 1,513
17년 전 조회 1,459
17년 전 조회 1,278
17년 전 조회 1,260
17년 전 조회 1,282
17년 전 조회 1,288
17년 전 조회 1,700
17년 전 조회 1,795
17년 전 조회 1,940
17년 전 조회 3,058
17년 전 조회 2,211
17년 전 조회 1,869
17년 전 조회 2,213
17년 전 조회 1,938
17년 전 조회 3,471
17년 전 조회 1,648
17년 전 조회 1,746
17년 전 조회 1,466
17년 전 조회 2,303
17년 전 조회 3,239
17년 전 조회 2,385
17년 전 조회 1,837
17년 전 조회 3,089