s

부드러운 움직임 2

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

//관성력
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,894
08-04-03 조회 2,702
08-04-02 조회 2,902
08-04-02 조회 2,773
08-04-02 조회 3,097
08-04-02 조회 3,054
08-04-02 조회 3,091
08-04-02 조회 3,038
08-04-02 조회 2,735
08-04-02 조회 2,727
08-04-02 조회 2,819
08-04-02 조회 3,103
08-04-02 조회 3,008
08-04-02 조회 2,784
08-04-02 조회 2,945
08-04-02 조회 2,591
08-04-02 조회 2,845
08-04-02 조회 3,168
08-04-02 조회 3,975
08-04-02 조회 3,188
08-03-31 조회 2,495
08-03-31 조회 3,065
08-03-31 조회 3,567
08-03-29 조회 2,699
08-03-28 조회 3,403
08-03-28 조회 2,901
08-03-28 조회 2,572
08-03-27 조회 2,395
08-03-26 조회 3,279
08-03-26 조회 4,228
08-03-25 조회 3,700
08-03-25 조회 2,720
08-03-25 조회 4,048
08-03-25 조회 3,565
08-03-25 조회 3,990
08-03-25 조회 4,022
08-03-25 조회 3,686
08-03-25 조회 3,576
08-03-25 조회 2,831
08-03-25 조회 3,583
08-03-25 조회 5,269
08-03-21 조회 2,932
08-03-19 조회 5,102
08-03-18 조회 2,974
08-03-16 조회 2,931
08-03-14 조회 3,230
08-03-13 조회 3,626
08-03-13 조회 2,593
08-03-11 조회 2,919
08-03-11 조회 3,468
08-03-11 조회 2,973
08-03-11 조회 2,929
08-03-11 조회 2,727
08-03-11 조회 2,572
08-03-11 조회 2,501
08-03-11 조회 2,306
08-03-11 조회 2,332
08-03-11 조회 2,371
08-03-11 조회 2,341
08-03-11 조회 2,753
08-03-11 조회 2,830
08-03-08 조회 3,047
08-03-07 조회 4,164
08-03-07 조회 3,270
08-03-07 조회 2,914
08-03-06 조회 3,266
08-03-06 조회 3,027
08-03-06 조회 4,698
08-03-05 조회 2,657
08-03-04 조회 2,806
08-03-04 조회 2,509
08-03-04 조회 3,353
08-03-03 조회 4,320
08-02-28 조회 3,404
08-02-27 조회 2,896
08-02-22 조회 4,238
08-02-22 조회 5,610
08-02-22 조회 2,884
08-02-21 조회 4,554
08-02-21 조회 2,761
08-02-21 조회 4,760
08-02-21 조회 7,059
08-02-21 조회 2,569
08-02-21 조회 3,337
08-02-20 조회 3,000
08-02-19 조회 2,681
08-02-19 조회 3,549
08-02-19 조회 3,750
08-02-15 조회 2,732
08-02-15 조회 3,917
08-02-14 조회 4,421
08-02-14 조회 2,635
08-02-12 조회 3,093
08-02-11 조회 5,073
08-02-09 조회 5,809
08-02-09 조회 3,005
08-02-08 조회 2,863
08-02-05 조회 3,849
08-02-04 조회 3,051
08-02-03 조회 5,352