s

부드러운 움직임 2

· 17년 전 · 1895

//관성력
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,409
17년 전 조회 1,508
17년 전 조회 1,294
17년 전 조회 1,342
17년 전 조회 1,373
17년 전 조회 1,442
17년 전 조회 1,453
17년 전 조회 1,486
17년 전 조회 1,440
17년 전 조회 1,774
17년 전 조회 3,098
17년 전 조회 3,495
17년 전 조회 1,588
17년 전 조회 1,682
17년 전 조회 1,485
17년 전 조회 2,255
17년 전 조회 3,171
17년 전 조회 1,514
17년 전 조회 1,484
17년 전 조회 1,501
17년 전 조회 1,379
17년 전 조회 1,571
17년 전 조회 1,627
17년 전 조회 1,431
17년 전 조회 2,699
17년 전 조회 1,458
17년 전 조회 1,715
17년 전 조회 1,606
17년 전 조회 1,910
17년 전 조회 1,923
17년 전 조회 1,937
17년 전 조회 1,998
17년 전 조회 1,659
17년 전 조회 1,723
17년 전 조회 1,650
17년 전 조회 1,985
17년 전 조회 1,906
17년 전 조회 1,688
17년 전 조회 1,884
17년 전 조회 1,536
17년 전 조회 1,778
17년 전 조회 2,092
17년 전 조회 2,927
17년 전 조회 2,144
17년 전 조회 1,527
17년 전 조회 2,102
17년 전 조회 2,545
17년 전 조회 1,693
17년 전 조회 2,443
17년 전 조회 1,896
17년 전 조회 1,604
17년 전 조회 1,441
17년 전 조회 2,117
17년 전 조회 3,034
17년 전 조회 2,645
17년 전 조회 1,655
17년 전 조회 3,031
17년 전 조회 2,557
17년 전 조회 2,904
17년 전 조회 2,917
17년 전 조회 2,692
17년 전 조회 2,513
17년 전 조회 1,868
17년 전 조회 2,595
17년 전 조회 4,116
17년 전 조회 1,961
17년 전 조회 4,052
17년 전 조회 1,976
17년 전 조회 1,863
17년 전 조회 2,211
17년 전 조회 2,635
17년 전 조회 1,576
17년 전 조회 1,925
17년 전 조회 2,487
17년 전 조회 1,968
17년 전 조회 1,918
17년 전 조회 1,711
17년 전 조회 1,539
17년 전 조회 1,506
17년 전 조회 1,317
17년 전 조회 1,304
17년 전 조회 1,330
17년 전 조회 1,334
17년 전 조회 1,730
17년 전 조회 1,835
17년 전 조회 1,979
17년 전 조회 3,100
17년 전 조회 2,252
17년 전 조회 1,906
17년 전 조회 2,253
17년 전 조회 1,968
17년 전 조회 3,508
17년 전 조회 1,685
17년 전 조회 1,800
17년 전 조회 1,501
17년 전 조회 2,341
17년 전 조회 3,276
17년 전 조회 2,422
17년 전 조회 1,875
18년 전 조회 3,130