s

부드러운 움직임 2

· 17년 전 · 1777

//관성력
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,294
17년 전 조회 1,405
17년 전 조회 1,178
17년 전 조회 1,226
17년 전 조회 1,262
17년 전 조회 1,332
17년 전 조회 1,354
17년 전 조회 1,379
17년 전 조회 1,336
17년 전 조회 1,658
17년 전 조회 2,982
17년 전 조회 3,381
17년 전 조회 1,471
17년 전 조회 1,570
17년 전 조회 1,381
17년 전 조회 2,134
17년 전 조회 3,056
17년 전 조회 1,399
17년 전 조회 1,391
17년 전 조회 1,390
17년 전 조회 1,253
17년 전 조회 1,444
17년 전 조회 1,500
17년 전 조회 1,316
17년 전 조회 2,593
17년 전 조회 1,344
17년 전 조회 1,605
17년 전 조회 1,485
17년 전 조회 1,793
17년 전 조회 1,808
17년 전 조회 1,823
17년 전 조회 1,884
17년 전 조회 1,549
17년 전 조회 1,623
17년 전 조회 1,535
17년 전 조회 1,878
17년 전 조회 1,784
17년 전 조회 1,582
17년 전 조회 1,766
17년 전 조회 1,422
17년 전 조회 1,661
17년 전 조회 1,976
17년 전 조회 2,812
17년 전 조회 2,018
17년 전 조회 1,427
17년 전 조회 1,979
17년 전 조회 2,436
17년 전 조회 1,591
17년 전 조회 2,349
17년 전 조회 1,778
17년 전 조회 1,488
17년 전 조회 1,340
17년 전 조회 2,012
17년 전 조회 2,913
17년 전 조회 2,531
17년 전 조회 1,544
17년 전 조회 2,898
17년 전 조회 2,431
17년 전 조회 2,782
17년 전 조회 2,796
17년 전 조회 2,568
17년 전 조회 2,388
17년 전 조회 1,742
17년 전 조회 2,481
17년 전 조회 3,974
17년 전 조회 1,847
17년 전 조회 3,942
17년 전 조회 1,865
17년 전 조회 1,757
17년 전 조회 2,094
17년 전 조회 2,498
17년 전 조회 1,452
17년 전 조회 1,797
17년 전 조회 2,360
17년 전 조회 1,837
17년 전 조회 1,775
17년 전 조회 1,564
17년 전 조회 1,414
17년 전 조회 1,365
17년 전 조회 1,175
17년 전 조회 1,169
17년 전 조회 1,195
17년 전 조회 1,203
17년 전 조회 1,619
17년 전 조회 1,699
17년 전 조회 1,839
17년 전 조회 2,973
17년 전 조회 2,119
17년 전 조회 1,787
17년 전 조회 2,122
17년 전 조회 1,839
17년 전 조회 3,373
17년 전 조회 1,555
17년 전 조회 1,674
17년 전 조회 1,388
17년 전 조회 2,205
17년 전 조회 3,151
17년 전 조회 2,293
17년 전 조회 1,750
17년 전 조회 3,006