s

부드러운 움직임 2

· 17년 전 · 2007

//관성력
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,504
17년 전 조회 1,597
17년 전 조회 1,379
17년 전 조회 1,429
17년 전 조회 1,465
17년 전 조회 1,535
17년 전 조회 1,543
17년 전 조회 1,585
17년 전 조회 1,536
17년 전 조회 1,869
17년 전 조회 3,184
17년 전 조회 3,594
17년 전 조회 1,685
17년 전 조회 1,778
17년 전 조회 1,574
17년 전 조회 2,339
17년 전 조회 3,271
17년 전 조회 1,606
17년 전 조회 1,568
17년 전 조회 1,603
17년 전 조회 1,469
17년 전 조회 1,664
17년 전 조회 1,715
17년 전 조회 1,525
17년 전 조회 2,798
17년 전 조회 1,547
17년 전 조회 1,804
17년 전 조회 1,699
17년 전 조회 2,011
17년 전 조회 2,016
17년 전 조회 2,017
17년 전 조회 2,086
17년 전 조회 1,759
17년 전 조회 1,811
17년 전 조회 1,743
17년 전 조회 2,083
17년 전 조회 2,005
17년 전 조회 1,783
17년 전 조회 1,980
17년 전 조회 1,632
17년 전 조회 1,865
17년 전 조회 2,192
17년 전 조회 3,024
17년 전 조회 2,239
17년 전 조회 1,616
17년 전 조회 2,201
17년 전 조회 2,641
17년 전 조회 1,792
17년 전 조회 2,532
17년 전 조회 2,008
17년 전 조회 1,704
17년 전 조회 1,528
17년 전 조회 2,208
17년 전 조회 3,140
17년 전 조회 2,744
17년 전 조회 1,744
17년 전 조회 3,139
17년 전 조회 2,655
17년 전 조회 2,996
17년 전 조회 3,008
17년 전 조회 2,791
17년 전 조회 2,606
17년 전 조회 1,964
17년 전 조회 2,692
17년 전 조회 4,221
17년 전 조회 2,057
17년 전 조회 4,146
17년 전 조회 2,064
17년 전 조회 1,959
17년 전 조회 2,317
17년 전 조회 2,733
17년 전 조회 1,670
17년 전 조회 2,023
17년 전 조회 2,582
17년 전 조회 2,071
17년 전 조회 2,013
17년 전 조회 1,803
17년 전 조회 1,628
17년 전 조회 1,612
17년 전 조회 1,406
17년 전 조회 1,398
17년 전 조회 1,419
17년 전 조회 1,427
17년 전 조회 1,813
17년 전 조회 1,934
18년 전 조회 2,069
18년 전 조회 3,197
18년 전 조회 2,349
18년 전 조회 2,004
18년 전 조회 2,353
18년 전 조회 2,078
18년 전 조회 3,605
18년 전 조회 1,771
18년 전 조회 1,887
18년 전 조회 1,589
18년 전 조회 2,443
18년 전 조회 3,375
18년 전 조회 2,514
18년 전 조회 1,959
18년 전 조회 3,222