s

부드러운 움직임 2

· 17년 전 · 1788

//관성력
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,312
17년 전 조회 1,421
17년 전 조회 1,200
17년 전 조회 1,248
17년 전 조회 1,282
17년 전 조회 1,348
17년 전 조회 1,370
17년 전 조회 1,392
17년 전 조회 1,345
17년 전 조회 1,675
17년 전 조회 2,998
17년 전 조회 3,392
17년 전 조회 1,487
17년 전 조회 1,582
17년 전 조회 1,392
17년 전 조회 2,144
17년 전 조회 3,062
17년 전 조회 1,413
17년 전 조회 1,401
17년 전 조회 1,399
17년 전 조회 1,265
17년 전 조회 1,453
17년 전 조회 1,514
17년 전 조회 1,326
17년 전 조회 2,605
17년 전 조회 1,355
17년 전 조회 1,617
17년 전 조회 1,496
17년 전 조회 1,806
17년 전 조회 1,818
17년 전 조회 1,833
17년 전 조회 1,900
17년 전 조회 1,562
17년 전 조회 1,640
17년 전 조회 1,544
17년 전 조회 1,890
17년 전 조회 1,803
17년 전 조회 1,600
17년 전 조회 1,781
17년 전 조회 1,435
17년 전 조회 1,674
17년 전 조회 1,986
17년 전 조회 2,823
17년 전 조회 2,035
17년 전 조회 1,438
17년 전 조회 1,997
17년 전 조회 2,452
17년 전 조회 1,600
17년 전 조회 2,366
17년 전 조회 1,789
17년 전 조회 1,500
17년 전 조회 1,353
17년 전 조회 2,023
17년 전 조회 2,922
17년 전 조회 2,539
17년 전 조회 1,561
17년 전 조회 2,910
17년 전 조회 2,443
17년 전 조회 2,793
17년 전 조회 2,806
17년 전 조회 2,581
17년 전 조회 2,402
17년 전 조회 1,755
17년 전 조회 2,494
17년 전 조회 3,986
17년 전 조회 1,857
17년 전 조회 3,955
17년 전 조회 1,879
17년 전 조회 1,774
17년 전 조회 2,105
17년 전 조회 2,506
17년 전 조회 1,471
17년 전 조회 1,806
17년 전 조회 2,377
17년 전 조회 1,850
17년 전 조회 1,786
17년 전 조회 1,579
17년 전 조회 1,424
17년 전 조회 1,386
17년 전 조회 1,189
17년 전 조회 1,184
17년 전 조회 1,200
17년 전 조회 1,215
17년 전 조회 1,634
17년 전 조회 1,714
17년 전 조회 1,856
17년 전 조회 2,984
17년 전 조회 2,133
17년 전 조회 1,801
17년 전 조회 2,143
17년 전 조회 1,853
17년 전 조회 3,396
17년 전 조회 1,567
17년 전 조회 1,690
17년 전 조회 1,408
17년 전 조회 2,221
17년 전 조회 3,162
17년 전 조회 2,308
17년 전 조회 1,763
17년 전 조회 3,024