s

부드러운 움직임 2

· 17년 전 · 1815

//관성력
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,338
17년 전 조회 1,444
17년 전 조회 1,230
17년 전 조회 1,273
17년 전 조회 1,309
17년 전 조회 1,372
17년 전 조회 1,398
17년 전 조회 1,420
17년 전 조회 1,368
17년 전 조회 1,696
17년 전 조회 3,026
17년 전 조회 3,421
17년 전 조회 1,508
17년 전 조회 1,606
17년 전 조회 1,416
17년 전 조회 2,174
17년 전 조회 3,091
17년 전 조회 1,430
17년 전 조회 1,421
17년 전 조회 1,430
17년 전 조회 1,296
17년 전 조회 1,481
17년 전 조회 1,547
17년 전 조회 1,352
17년 전 조회 2,630
17년 전 조회 1,385
17년 전 조회 1,639
17년 전 조회 1,519
17년 전 조회 1,834
17년 전 조회 1,847
17년 전 조회 1,853
17년 전 조회 1,923
17년 전 조회 1,584
17년 전 조회 1,666
17년 전 조회 1,568
17년 전 조회 1,907
17년 전 조회 1,827
17년 전 조회 1,623
17년 전 조회 1,809
17년 전 조회 1,469
17년 전 조회 1,708
17년 전 조회 2,014
17년 전 조회 2,851
17년 전 조회 2,057
17년 전 조회 1,462
17년 전 조회 2,022
17년 전 조회 2,478
17년 전 조회 1,619
17년 전 조회 2,384
17년 전 조회 1,816
17년 전 조회 1,531
17년 전 조회 1,375
17년 전 조회 2,046
17년 전 조회 2,951
17년 전 조회 2,565
17년 전 조회 1,581
17년 전 조회 2,937
17년 전 조회 2,469
17년 전 조회 2,821
17년 전 조회 2,827
17년 전 조회 2,606
17년 전 조회 2,420
17년 전 조회 1,777
17년 전 조회 2,522
17년 전 조회 4,011
17년 전 조회 1,887
17년 전 조회 3,973
17년 전 조회 1,898
17년 전 조회 1,792
17년 전 조회 2,134
17년 전 조회 2,537
17년 전 조회 1,493
17년 전 조회 1,834
17년 전 조회 2,399
17년 전 조회 1,876
17년 전 조회 1,809
17년 전 조회 1,609
17년 전 조회 1,453
17년 전 조회 1,412
17년 전 조회 1,220
17년 전 조회 1,212
17년 전 조회 1,228
17년 전 조회 1,241
17년 전 조회 1,658
17년 전 조회 1,745
17년 전 조회 1,887
17년 전 조회 3,012
17년 전 조회 2,155
17년 전 조회 1,827
17년 전 조회 2,161
17년 전 조회 1,885
17년 전 조회 3,418
17년 전 조회 1,596
17년 전 조회 1,710
17년 전 조회 1,426
17년 전 조회 2,249
17년 전 조회 3,188
17년 전 조회 2,336
17년 전 조회 1,792
17년 전 조회 3,048