s

부드러운 움직임 2

· 17년 전 · 1793

//관성력
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,324
17년 전 조회 1,430
17년 전 조회 1,206
17년 전 조회 1,255
17년 전 조회 1,292
17년 전 조회 1,354
17년 전 조회 1,382
17년 전 조회 1,397
17년 전 조회 1,349
17년 전 조회 1,685
17년 전 조회 3,005
17년 전 조회 3,398
17년 전 조회 1,494
17년 전 조회 1,589
17년 전 조회 1,398
17년 전 조회 2,151
17년 전 조회 3,072
17년 전 조회 1,415
17년 전 조회 1,407
17년 전 조회 1,408
17년 전 조회 1,275
17년 전 조회 1,464
17년 전 조회 1,526
17년 전 조회 1,335
17년 전 조회 2,617
17년 전 조회 1,361
17년 전 조회 1,624
17년 전 조회 1,504
17년 전 조회 1,814
17년 전 조회 1,826
17년 전 조회 1,839
17년 전 조회 1,910
17년 전 조회 1,569
17년 전 조회 1,649
17년 전 조회 1,551
17년 전 조회 1,897
17년 전 조회 1,810
17년 전 조회 1,613
17년 전 조회 1,793
17년 전 조회 1,445
17년 전 조회 1,684
17년 전 조회 1,994
17년 전 조회 2,827
17년 전 조회 2,041
17년 전 조회 1,448
17년 전 조회 2,002
17년 전 조회 2,462
17년 전 조회 1,609
17년 전 조회 2,371
17년 전 조회 1,794
17년 전 조회 1,506
17년 전 조회 1,358
17년 전 조회 2,030
17년 전 조회 2,933
17년 전 조회 2,543
17년 전 조회 1,567
17년 전 조회 2,918
17년 전 조회 2,450
17년 전 조회 2,802
17년 전 조회 2,816
17년 전 조회 2,593
17년 전 조회 2,408
17년 전 조회 1,764
17년 전 조회 2,502
17년 전 조회 3,993
17년 전 조회 1,867
17년 전 조회 3,960
17년 전 조회 1,885
17년 전 조회 1,782
17년 전 조회 2,119
17년 전 조회 2,513
17년 전 조회 1,478
17년 전 조회 1,815
17년 전 조회 2,382
17년 전 조회 1,859
17년 전 조회 1,795
17년 전 조회 1,587
17년 전 조회 1,429
17년 전 조회 1,394
17년 전 조회 1,199
17년 전 조회 1,191
17년 전 조회 1,206
17년 전 조회 1,223
17년 전 조회 1,639
17년 전 조회 1,723
17년 전 조회 1,863
17년 전 조회 2,991
17년 전 조회 2,137
17년 전 조회 1,809
17년 전 조회 2,149
17년 전 조회 1,866
17년 전 조회 3,405
17년 전 조회 1,574
17년 전 조회 1,697
17년 전 조회 1,413
17년 전 조회 2,232
17년 전 조회 3,169
17년 전 조회 2,319
17년 전 조회 1,773
17년 전 조회 3,034