s

부드러운 움직임 2

· 17년 전 · 1807

//관성력
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,335
17년 전 조회 1,439
17년 전 조회 1,221
17년 전 조회 1,267
17년 전 조회 1,303
17년 전 조회 1,367
17년 전 조회 1,392
17년 전 조회 1,415
17년 전 조회 1,363
17년 전 조회 1,695
17년 전 조회 3,020
17년 전 조회 3,415
17년 전 조회 1,505
17년 전 조회 1,601
17년 전 조회 1,410
17년 전 조회 2,168
17년 전 조회 3,087
17년 전 조회 1,425
17년 전 조회 1,417
17년 전 조회 1,423
17년 전 조회 1,290
17년 전 조회 1,477
17년 전 조회 1,541
17년 전 조회 1,346
17년 전 조회 2,624
17년 전 조회 1,380
17년 전 조회 1,634
17년 전 조회 1,515
17년 전 조회 1,828
17년 전 조회 1,838
17년 전 조회 1,847
17년 전 조회 1,920
17년 전 조회 1,580
17년 전 조회 1,662
17년 전 조회 1,564
17년 전 조회 1,905
17년 전 조회 1,827
17년 전 조회 1,619
17년 전 조회 1,805
17년 전 조회 1,459
17년 전 조회 1,702
17년 전 조회 2,011
17년 전 조회 2,846
17년 전 조회 2,052
17년 전 조회 1,458
17년 전 조회 2,018
17년 전 조회 2,472
17년 전 조회 1,614
17년 전 조회 2,380
17년 전 조회 1,808
17년 전 조회 1,524
17년 전 조회 1,370
17년 전 조회 2,040
17년 전 조회 2,949
17년 전 조회 2,555
17년 전 조회 1,577
17년 전 조회 2,929
17년 전 조회 2,466
17년 전 조회 2,816
17년 전 조회 2,823
17년 전 조회 2,604
17년 전 조회 2,418
17년 전 조회 1,774
17년 전 조회 2,517
17년 전 조회 4,008
17년 전 조회 1,880
17년 전 조회 3,972
17년 전 조회 1,893
17년 전 조회 1,789
17년 전 조회 2,125
17년 전 조회 2,534
17년 전 조회 1,488
17년 전 조회 1,832
17년 전 조회 2,397
17년 전 조회 1,869
17년 전 조회 1,805
17년 전 조회 1,605
17년 전 조회 1,444
17년 전 조회 1,407
17년 전 조회 1,210
17년 전 조회 1,205
17년 전 조회 1,221
17년 전 조회 1,237
17년 전 조회 1,655
17년 전 조회 1,741
17년 전 조회 1,882
17년 전 조회 3,008
17년 전 조회 2,151
17년 전 조회 1,822
17년 전 조회 2,158
17년 전 조회 1,880
17년 전 조회 3,416
17년 전 조회 1,587
17년 전 조회 1,706
17년 전 조회 1,422
17년 전 조회 2,246
17년 전 조회 3,186
17년 전 조회 2,324
17년 전 조회 1,784
17년 전 조회 3,045