s

부드러운 움직임 2

· 17년 전 · 1829

//관성력
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,353
17년 전 조회 1,454
17년 전 조회 1,240
17년 전 조회 1,283
17년 전 조회 1,320
17년 전 조회 1,389
17년 전 조회 1,409
17년 전 조회 1,434
17년 전 조회 1,374
17년 전 조회 1,710
17년 전 조회 3,036
17년 전 조회 3,429
17년 전 조회 1,525
17년 전 조회 1,615
17년 전 조회 1,424
17년 전 조회 2,188
17년 전 조회 3,106
17년 전 조회 1,445
17년 전 조회 1,433
17년 전 조회 1,440
17년 전 조회 1,309
17년 전 조회 1,494
17년 전 조회 1,560
17년 전 조회 1,364
17년 전 조회 2,640
17년 전 조회 1,396
17년 전 조회 1,656
17년 전 조회 1,536
17년 전 조회 1,849
17년 전 조회 1,860
17년 전 조회 1,867
17년 전 조회 1,936
17년 전 조회 1,598
17년 전 조회 1,676
17년 전 조회 1,582
17년 전 조회 1,925
17년 전 조회 1,841
17년 전 조회 1,630
17년 전 조회 1,822
17년 전 조회 1,477
17년 전 조회 1,712
17년 전 조회 2,023
17년 전 조회 2,865
17년 전 조회 2,073
17년 전 조회 1,473
17년 전 조회 2,040
17년 전 조회 2,485
17년 전 조회 1,630
17년 전 조회 2,394
17년 전 조회 1,830
17년 전 조회 1,544
17년 전 조회 1,383
17년 전 조회 2,051
17년 전 조회 2,964
17년 전 조회 2,572
17년 전 조회 1,594
17년 전 조회 2,954
17년 전 조회 2,485
17년 전 조회 2,836
17년 전 조회 2,841
17년 전 조회 2,620
17년 전 조회 2,432
17년 전 조회 1,794
17년 전 조회 2,535
17년 전 조회 4,024
17년 전 조회 1,902
17년 전 조회 3,985
17년 전 조회 1,913
17년 전 조회 1,799
17년 전 조회 2,142
17년 전 조회 2,550
17년 전 조회 1,504
17년 전 조회 1,843
17년 전 조회 2,408
17년 전 조회 1,891
17년 전 조회 1,827
17년 전 조회 1,629
17년 전 조회 1,464
17년 전 조회 1,427
17년 전 조회 1,235
17년 전 조회 1,222
17년 전 조회 1,241
17년 전 조회 1,254
17년 전 조회 1,666
17년 전 조회 1,757
17년 전 조회 1,894
17년 전 조회 3,025
17년 전 조회 2,167
17년 전 조회 1,836
17년 전 조회 2,178
17년 전 조회 1,895
17년 전 조회 3,433
17년 전 조회 1,609
17년 전 조회 1,718
17년 전 조회 1,432
17년 전 조회 2,266
17년 전 조회 3,200
17년 전 조회 2,349
17년 전 조회 1,805
17년 전 조회 3,058