s

부드러운 움직임 2

· 17년 전 · 1769

//관성력
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,281
17년 전 조회 1,393
17년 전 조회 1,167
17년 전 조회 1,215
17년 전 조회 1,252
17년 전 조회 1,323
17년 전 조회 1,342
17년 전 조회 1,366
17년 전 조회 1,325
17년 전 조회 1,646
17년 전 조회 2,971
17년 전 조회 3,372
17년 전 조회 1,462
17년 전 조회 1,560
17년 전 조회 1,367
17년 전 조회 2,126
17년 전 조회 3,046
17년 전 조회 1,386
17년 전 조회 1,379
17년 전 조회 1,378
17년 전 조회 1,241
17년 전 조회 1,434
17년 전 조회 1,491
17년 전 조회 1,302
17년 전 조회 2,585
17년 전 조회 1,335
17년 전 조회 1,596
17년 전 조회 1,475
17년 전 조회 1,780
17년 전 조회 1,797
17년 전 조회 1,819
17년 전 조회 1,873
17년 전 조회 1,533
17년 전 조회 1,613
17년 전 조회 1,527
17년 전 조회 1,867
17년 전 조회 1,771
17년 전 조회 1,570
17년 전 조회 1,752
17년 전 조회 1,415
17년 전 조회 1,651
17년 전 조회 1,967
17년 전 조회 2,798
17년 전 조회 2,006
17년 전 조회 1,411
17년 전 조회 1,967
17년 전 조회 2,422
17년 전 조회 1,583
17년 전 조회 2,338
17년 전 조회 1,770
17년 전 조회 1,475
17년 전 조회 1,333
17년 전 조회 2,002
17년 전 조회 2,902
17년 전 조회 2,521
17년 전 조회 1,537
17년 전 조회 2,888
17년 전 조회 2,422
17년 전 조회 2,772
17년 전 조회 2,786
17년 전 조회 2,561
17년 전 조회 2,379
17년 전 조회 1,734
17년 전 조회 2,471
17년 전 조회 3,962
17년 전 조회 1,842
17년 전 조회 3,925
17년 전 조회 1,856
17년 전 조회 1,746
17년 전 조회 2,085
17년 전 조회 2,487
17년 전 조회 1,441
17년 전 조회 1,786
17년 전 조회 2,353
17년 전 조회 1,823
17년 전 조회 1,769
17년 전 조회 1,555
17년 전 조회 1,405
17년 전 조회 1,356
17년 전 조회 1,167
17년 전 조회 1,159
17년 전 조회 1,190
17년 전 조회 1,194
17년 전 조회 1,613
17년 전 조회 1,691
17년 전 조회 1,830
17년 전 조회 2,964
17년 전 조회 2,109
17년 전 조회 1,778
17년 전 조회 2,114
17년 전 조회 1,830
17년 전 조회 3,363
17년 전 조회 1,544
17년 전 조회 1,670
17년 전 조회 1,384
17년 전 조회 2,198
17년 전 조회 3,143
17년 전 조회 2,281
17년 전 조회 1,742
17년 전 조회 2,995