s

부드러운 움직임 2

· 2008-03-28 (금) 10:19:06 · 2911

//관성력
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에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
08-04-03 조회 3,921
08-04-03 조회 2,714
08-04-02 조회 2,919
08-04-02 조회 2,791
08-04-02 조회 3,112
08-04-02 조회 3,071
08-04-02 조회 3,100
08-04-02 조회 3,047
08-04-02 조회 2,745
08-04-02 조회 2,735
08-04-02 조회 2,828
08-04-02 조회 3,126
08-04-02 조회 3,025
08-04-02 조회 2,806
08-04-02 조회 2,955
08-04-02 조회 2,607
08-04-02 조회 2,858
08-04-02 조회 3,178
08-04-02 조회 3,989
08-04-02 조회 3,198
08-03-31 조회 2,508
08-03-31 조회 3,077
08-03-31 조회 3,578
08-03-29 조회 2,706
08-03-28 조회 3,416
08-03-28 조회 2,912
08-03-28 조회 2,582
08-03-27 조회 2,412
08-03-26 조회 3,294
08-03-26 조회 4,244
08-03-25 조회 3,713
08-03-25 조회 2,733
08-03-25 조회 4,061
08-03-25 조회 3,583
08-03-25 조회 4,003
08-03-25 조회 4,034
08-03-25 조회 3,700
08-03-25 조회 3,594
08-03-25 조회 2,841
08-03-25 조회 3,597
08-03-25 조회 5,287
08-03-21 조회 2,947
08-03-19 조회 5,117
08-03-18 조회 2,981
08-03-16 조회 2,938
08-03-14 조회 3,240
08-03-13 조회 3,638
08-03-13 조회 2,608
08-03-11 조회 2,932
08-03-11 조회 3,483
08-03-11 조회 2,983
08-03-11 조회 2,942
08-03-11 조회 2,746
08-03-11 조회 2,589
08-03-11 조회 2,521
08-03-11 조회 2,319
08-03-11 조회 2,345
08-03-11 조회 2,391
08-03-11 조회 2,353
08-03-11 조회 2,767
08-03-11 조회 2,841
08-03-08 조회 3,060
08-03-07 조회 4,180
08-03-07 조회 3,283
08-03-07 조회 2,935
08-03-06 조회 3,285
08-03-06 조회 3,044
08-03-06 조회 4,724
08-03-05 조회 2,669
08-03-04 조회 2,817
08-03-04 조회 2,517
08-03-04 조회 3,367
08-03-03 조회 4,334
08-02-28 조회 3,426
08-02-27 조회 2,912
08-02-22 조회 4,252
08-02-22 조회 5,628
08-02-22 조회 2,900
08-02-21 조회 4,566
08-02-21 조회 2,776
08-02-21 조회 4,781
08-02-21 조회 7,073
08-02-21 조회 2,582
08-02-21 조회 3,349
08-02-20 조회 3,012
08-02-19 조회 2,694
08-02-19 조회 3,558
08-02-19 조회 3,760
08-02-15 조회 2,740
08-02-15 조회 3,927
08-02-14 조회 4,430
08-02-14 조회 2,644
08-02-12 조회 3,098
08-02-11 조회 5,081
08-02-09 조회 5,817
08-02-09 조회 3,011
08-02-08 조회 2,870
08-02-05 조회 3,861
08-02-04 조회 3,071
08-02-03 조회 5,372