s

부드러운 움직임 2

· 17년 전 · 1878

//관성력
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,398
17년 전 조회 1,494
17년 전 조회 1,286
17년 전 조회 1,333
17년 전 조회 1,361
17년 전 조회 1,427
17년 전 조회 1,442
17년 전 조회 1,479
17년 전 조회 1,425
17년 전 조회 1,767
17년 전 조회 3,082
17년 전 조회 3,478
17년 전 조회 1,580
17년 전 조회 1,667
17년 전 조회 1,472
17년 전 조회 2,245
17년 전 조회 3,156
17년 전 조회 1,499
17년 전 조회 1,471
17년 전 조회 1,494
17년 전 조회 1,366
17년 전 조회 1,554
17년 전 조회 1,615
17년 전 조회 1,422
17년 전 조회 2,685
17년 전 조회 1,444
17년 전 조회 1,708
17년 전 조회 1,590
17년 전 조회 1,899
17년 전 조회 1,914
17년 전 조회 1,923
17년 전 조회 1,987
17년 전 조회 1,648
17년 전 조회 1,711
17년 전 조회 1,634
17년 전 조회 1,970
17년 전 조회 1,894
17년 전 조회 1,681
17년 전 조회 1,874
17년 전 조회 1,527
17년 전 조회 1,764
17년 전 조회 2,077
17년 전 조회 2,914
17년 전 조회 2,130
17년 전 조회 1,517
17년 전 조회 2,089
17년 전 조회 2,528
17년 전 조회 1,679
17년 전 조회 2,429
17년 전 조회 1,879
17년 전 조회 1,587
17년 전 조회 1,425
17년 전 조회 2,101
17년 전 조회 3,018
17년 전 조회 2,630
17년 전 조회 1,637
17년 전 조회 3,017
17년 전 조회 2,542
17년 전 조회 2,886
17년 전 조회 2,902
17년 전 조회 2,672
17년 전 조회 2,498
17년 전 조회 1,856
17년 전 조회 2,581
17년 전 조회 4,099
17년 전 조회 1,944
17년 전 조회 4,034
17년 전 조회 1,963
17년 전 조회 1,850
17년 전 조회 2,194
17년 전 조회 2,620
17년 전 조회 1,561
17년 전 조회 1,906
17년 전 조회 2,474
17년 전 조회 1,953
17년 전 조회 1,904
17년 전 조회 1,695
17년 전 조회 1,526
17년 전 조회 1,487
17년 전 조회 1,301
17년 전 조회 1,286
17년 전 조회 1,309
17년 전 조회 1,317
17년 전 조회 1,719
17년 전 조회 1,817
17년 전 조회 1,963
17년 전 조회 3,082
17년 전 조회 2,236
17년 전 조회 1,887
17년 전 조회 2,238
17년 전 조회 1,955
17년 전 조회 3,494
17년 전 조회 1,666
17년 전 조회 1,777
17년 전 조회 1,493
17년 전 조회 2,328
17년 전 조회 3,259
17년 전 조회 2,405
17년 전 조회 1,857
17년 전 조회 3,113