s

부드러운 움직임 2

· 17년 전 · 1919

//관성력
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,432
17년 전 조회 1,525
17년 전 조회 1,318
17년 전 조회 1,358
17년 전 조회 1,393
17년 전 조회 1,464
17년 전 조회 1,472
17년 전 조회 1,510
17년 전 조회 1,464
17년 전 조회 1,793
17년 전 조회 3,114
17년 전 조회 3,516
17년 전 조회 1,612
17년 전 조회 1,704
17년 전 조회 1,509
17년 전 조회 2,280
17년 전 조회 3,198
17년 전 조회 1,542
17년 전 조회 1,499
17년 전 조회 1,525
17년 전 조회 1,404
17년 전 조회 1,595
17년 전 조회 1,645
17년 전 조회 1,454
17년 전 조회 2,723
17년 전 조회 1,480
17년 전 조회 1,734
17년 전 조회 1,627
17년 전 조회 1,932
17년 전 조회 1,942
17년 전 조회 1,962
17년 전 조회 2,021
17년 전 조회 1,690
17년 전 조회 1,745
17년 전 조회 1,666
17년 전 조회 2,009
17년 전 조회 1,929
17년 전 조회 1,711
17년 전 조회 1,909
17년 전 조회 1,560
17년 전 조회 1,798
17년 전 조회 2,120
17년 전 조회 2,953
17년 전 조회 2,167
17년 전 조회 1,554
17년 전 조회 2,126
17년 전 조회 2,576
17년 전 조회 1,716
17년 전 조회 2,466
17년 전 조회 1,920
17년 전 조회 1,630
17년 전 조회 1,466
17년 전 조회 2,136
17년 전 조회 3,060
17년 전 조회 2,672
17년 전 조회 1,680
17년 전 조회 3,070
17년 전 조회 2,578
17년 전 조회 2,921
17년 전 조회 2,933
17년 전 조회 2,717
17년 전 조회 2,531
17년 전 조회 1,888
17년 전 조회 2,622
17년 전 조회 4,144
17년 전 조회 1,976
17년 전 조회 4,071
17년 전 조회 1,997
17년 전 조회 1,888
17년 전 조회 2,244
17년 전 조회 2,662
17년 전 조회 1,594
17년 전 조회 1,954
17년 전 조회 2,512
17년 전 조회 1,997
17년 전 조회 1,939
17년 전 조회 1,723
17년 전 조회 1,560
17년 전 조회 1,522
17년 전 조회 1,335
17년 전 조회 1,328
17년 전 조회 1,353
17년 전 조회 1,360
17년 전 조회 1,752
17년 전 조회 1,861
17년 전 조회 2,001
17년 전 조회 3,124
17년 전 조회 2,272
17년 전 조회 1,935
17년 전 조회 2,280
17년 전 조회 1,998
17년 전 조회 3,531
17년 전 조회 1,699
17년 전 조회 1,825
17년 전 조회 1,521
17년 전 조회 2,365
17년 전 조회 3,301
17년 전 조회 2,446
17년 전 조회 1,900
18년 전 조회 3,149