s

부드러운 움직임 2

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

//관성력
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-06-19 조회 2,406
08-06-15 조회 3,158
08-06-15 조회 2,386
08-06-14 조회 2,726
08-06-14 조회 3,618
08-06-14 조회 3,314
08-06-12 조회 2,195
08-06-11 조회 2,230
08-06-11 조회 2,325
08-06-11 조회 7,359
08-06-11 조회 7,089
08-06-08 조회 3,275
08-06-07 조회 2,207
08-06-05 조회 2,329
08-06-05 조회 3,305
08-06-05 조회 2,672
08-06-05 조회 2,327
08-06-05 조회 2,356
08-06-04 조회 2,276
08-06-03 조회 2,265
08-06-03 조회 5,342
08-06-03 조회 3,580
08-06-02 조회 2,878
08-06-02 조회 4,014
08-06-01 조회 2,636
08-05-31 조회 2,328
08-05-31 조회 2,341
08-05-31 조회 2,430
08-05-30 조회 2,301
08-05-29 조회 2,443
08-05-29 조회 3,702
08-05-27 조회 5,535
08-05-26 조회 2,381
08-05-26 조회 5,296
08-05-25 조회 5,369
08-05-24 조회 2,437
08-05-23 조회 3,443
08-05-23 조회 2,857
08-05-23 조회 4,614
08-05-22 조회 2,615
08-05-21 조회 4,958
08-05-21 조회 4,741
08-05-21 조회 3,898
08-05-20 조회 4,492
08-05-20 조회 4,081
08-05-20 조회 3,307
08-05-20 조회 4,575
08-05-20 조회 3,935
08-05-20 조회 4,821
08-05-19 조회 2,356
08-05-16 조회 3,479
08-05-15 조회 2,545
08-05-15 조회 2,375
08-05-15 조회 2,368
08-05-14 조회 2,301
08-05-13 조회 2,756
08-05-13 조회 4,154
08-05-13 조회 4,587
08-05-09 조회 4,355
08-05-08 조회 3,108
08-05-08 조회 5,263
08-05-08 조회 2,622
08-05-07 조회 2,324
08-05-07 조회 2,474
08-05-07 조회 2,281
08-05-01 조회 2,599
08-05-01 조회 2,951
08-04-29 조회 3,797
08-04-28 조회 3,613
08-04-26 조회 2,628
08-04-26 조회 2,362
08-04-26 조회 3,634
08-04-25 조회 4,061
08-04-23 조회 4,500
08-04-22 조회 4,436
08-04-22 조회 3,587
08-04-22 조회 5,151
08-04-22 조회 4,525
08-04-22 조회 6,909
08-04-22 조회 3,977
08-04-21 조회 3,116
08-04-21 조회 3,167
08-04-21 조회 3,110
08-04-21 조회 2,949
08-04-21 조회 4,064
08-04-20 조회 3,222
08-04-20 조회 2,909
08-04-20 조회 3,441
08-04-19 조회 2,338
08-04-18 조회 3,043
08-04-18 조회 4,360
08-04-17 조회 3,592
08-04-17 조회 3,044
08-04-17 조회 3,270
08-04-17 조회 2,553
08-04-17 조회 2,951
08-04-17 조회 2,436
08-04-17 조회 2,994
08-04-17 조회 3,050
08-04-17 조회 2,251