s

부드러운 움직임 2

· 17년 전 · 1831

//관성력
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,354
17년 전 조회 1,454
17년 전 조회 1,240
17년 전 조회 1,284
17년 전 조회 1,322
17년 전 조회 1,389
17년 전 조회 1,409
17년 전 조회 1,435
17년 전 조회 1,375
17년 전 조회 1,711
17년 전 조회 3,036
17년 전 조회 3,432
17년 전 조회 1,526
17년 전 조회 1,615
17년 전 조회 1,424
17년 전 조회 2,188
17년 전 조회 3,107
17년 전 조회 1,446
17년 전 조회 1,433
17년 전 조회 1,440
17년 전 조회 1,311
17년 전 조회 1,497
17년 전 조회 1,561
17년 전 조회 1,368
17년 전 조회 2,641
17년 전 조회 1,396
17년 전 조회 1,658
17년 전 조회 1,536
17년 전 조회 1,850
17년 전 조회 1,860
17년 전 조회 1,869
17년 전 조회 1,936
17년 전 조회 1,599
17년 전 조회 1,676
17년 전 조회 1,582
17년 전 조회 1,928
17년 전 조회 1,842
17년 전 조회 1,631
17년 전 조회 1,823
17년 전 조회 1,481
17년 전 조회 1,714
17년 전 조회 2,023
17년 전 조회 2,865
17년 전 조회 2,076
17년 전 조회 1,474
17년 전 조회 2,042
17년 전 조회 2,486
17년 전 조회 1,630
17년 전 조회 2,395
17년 전 조회 1,832
17년 전 조회 1,546
17년 전 조회 1,383
17년 전 조회 2,052
17년 전 조회 2,965
17년 전 조회 2,572
17년 전 조회 1,594
17년 전 조회 2,956
17년 전 조회 2,485
17년 전 조회 2,836
17년 전 조회 2,843
17년 전 조회 2,622
17년 전 조회 2,432
17년 전 조회 1,797
17년 전 조회 2,536
17년 전 조회 4,026
17년 전 조회 1,903
17년 전 조회 3,986
17년 전 조회 1,914
17년 전 조회 1,799
17년 전 조회 2,144
17년 전 조회 2,551
17년 전 조회 1,504
17년 전 조회 1,844
17년 전 조회 2,410
17년 전 조회 1,892
17년 전 조회 1,828
17년 전 조회 1,629
17년 전 조회 1,466
17년 전 조회 1,428
17년 전 조회 1,239
17년 전 조회 1,222
17년 전 조회 1,241
17년 전 조회 1,254
17년 전 조회 1,666
17년 전 조회 1,758
17년 전 조회 1,895
17년 전 조회 3,025
17년 전 조회 2,168
17년 전 조회 1,837
17년 전 조회 2,181
17년 전 조회 1,897
17년 전 조회 3,435
17년 전 조회 1,609
17년 전 조회 1,718
17년 전 조회 1,432
17년 전 조회 2,267
17년 전 조회 3,200
17년 전 조회 2,349
17년 전 조회 1,806
17년 전 조회 3,058