s

부드러운 움직임 2

· 17년 전 · 1922

//관성력
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,435
17년 전 조회 1,529
17년 전 조회 1,319
17년 전 조회 1,359
17년 전 조회 1,397
17년 전 조회 1,466
17년 전 조회 1,475
17년 전 조회 1,513
17년 전 조회 1,466
17년 전 조회 1,795
17년 전 조회 3,117
17년 전 조회 3,519
17년 전 조회 1,616
17년 전 조회 1,706
17년 전 조회 1,513
17년 전 조회 2,280
17년 전 조회 3,201
17년 전 조회 1,542
17년 전 조회 1,500
17년 전 조회 1,527
17년 전 조회 1,406
17년 전 조회 1,597
17년 전 조회 1,647
17년 전 조회 1,458
17년 전 조회 2,726
17년 전 조회 1,483
17년 전 조회 1,735
17년 전 조회 1,630
17년 전 조회 1,934
17년 전 조회 1,946
17년 전 조회 1,966
17년 전 조회 2,022
17년 전 조회 1,691
17년 전 조회 1,748
17년 전 조회 1,668
17년 전 조회 2,013
17년 전 조회 1,929
17년 전 조회 1,713
17년 전 조회 1,912
17년 전 조회 1,561
17년 전 조회 1,798
17년 전 조회 2,122
17년 전 조회 2,953
17년 전 조회 2,169
17년 전 조회 1,556
17년 전 조회 2,131
17년 전 조회 2,576
17년 전 조회 1,720
17년 전 조회 2,469
17년 전 조회 1,923
17년 전 조회 1,632
17년 전 조회 1,466
17년 전 조회 2,139
17년 전 조회 3,063
17년 전 조회 2,676
17년 전 조회 1,682
17년 전 조회 3,072
17년 전 조회 2,579
17년 전 조회 2,922
17년 전 조회 2,937
17년 전 조회 2,719
17년 전 조회 2,534
17년 전 조회 1,890
17년 전 조회 2,625
17년 전 조회 4,145
17년 전 조회 1,979
17년 전 조회 4,073
17년 전 조회 1,999
17년 전 조회 1,892
17년 전 조회 2,249
17년 전 조회 2,666
17년 전 조회 1,599
17년 전 조회 1,956
17년 전 조회 2,514
17년 전 조회 1,998
17년 전 조회 1,943
17년 전 조회 1,724
17년 전 조회 1,561
17년 전 조회 1,526
17년 전 조회 1,339
17년 전 조회 1,330
17년 전 조회 1,356
17년 전 조회 1,362
17년 전 조회 1,754
17년 전 조회 1,863
17년 전 조회 2,005
17년 전 조회 3,127
17년 전 조회 2,274
17년 전 조회 1,938
17년 전 조회 2,281
17년 전 조회 2,000
17년 전 조회 3,531
17년 전 조회 1,704
17년 전 조회 1,827
17년 전 조회 1,524
17년 전 조회 2,366
17년 전 조회 3,303
17년 전 조회 2,448
17년 전 조회 1,903
18년 전 조회 3,151