s

부드러운 움직임 2

· 17년 전 · 1822

//관성력
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,352
17년 전 조회 1,451
17년 전 조회 1,236
17년 전 조회 1,279
17년 전 조회 1,318
17년 전 조회 1,386
17년 전 조회 1,405
17년 전 조회 1,428
17년 전 조회 1,371
17년 전 조회 1,704
17년 전 조회 3,032
17년 전 조회 3,426
17년 전 조회 1,517
17년 전 조회 1,615
17년 전 조회 1,420
17년 전 조회 2,183
17년 전 조회 3,104
17년 전 조회 1,443
17년 전 조회 1,428
17년 전 조회 1,435
17년 전 조회 1,306
17년 전 조회 1,488
17년 전 조회 1,556
17년 전 조회 1,357
17년 전 조회 2,635
17년 전 조회 1,392
17년 전 조회 1,652
17년 전 조회 1,532
17년 전 조회 1,843
17년 전 조회 1,856
17년 전 조회 1,862
17년 전 조회 1,934
17년 전 조회 1,591
17년 전 조회 1,673
17년 전 조회 1,577
17년 전 조회 1,919
17년 전 조회 1,838
17년 전 조회 1,629
17년 전 조회 1,819
17년 전 조회 1,477
17년 전 조회 1,712
17년 전 조회 2,019
17년 전 조회 2,858
17년 전 조회 2,065
17년 전 조회 1,468
17년 전 조회 2,035
17년 전 조회 2,484
17년 전 조회 1,629
17년 전 조회 2,394
17년 전 조회 1,823
17년 전 조회 1,540
17년 전 조회 1,382
17년 전 조회 2,049
17년 전 조회 2,964
17년 전 조회 2,569
17년 전 조회 1,589
17년 전 조회 2,946
17년 전 조회 2,478
17년 전 조회 2,834
17년 전 조회 2,836
17년 전 조회 2,616
17년 전 조회 2,429
17년 전 조회 1,787
17년 전 조회 2,532
17년 전 조회 4,017
17년 전 조회 1,900
17년 전 조회 3,982
17년 전 조회 1,907
17년 전 조회 1,799
17년 전 조회 2,141
17년 전 조회 2,544
17년 전 조회 1,501
17년 전 조회 1,837
17년 전 조회 2,404
17년 전 조회 1,887
17년 전 조회 1,822
17년 전 조회 1,624
17년 전 조회 1,460
17년 전 조회 1,422
17년 전 조회 1,230
17년 전 조회 1,216
17년 전 조회 1,235
17년 전 조회 1,251
17년 전 조회 1,664
17년 전 조회 1,751
17년 전 조회 1,891
17년 전 조회 3,022
17년 전 조회 2,163
17년 전 조회 1,833
17년 전 조회 2,175
17년 전 조회 1,891
17년 전 조회 3,429
17년 전 조회 1,606
17년 전 조회 1,715
17년 전 조회 1,430
17년 전 조회 2,260
17년 전 조회 3,197
17년 전 조회 2,345
17년 전 조회 1,799
17년 전 조회 3,055