s

부드러운 움직임 2

· 2008-03-28 (금) 10:19:06 · 2932

//관성력
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에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
07-10-19 조회 4,763
07-10-19 조회 3,421
07-10-19 조회 3,183
07-10-19 조회 3,141
07-10-19 조회 2,840
07-10-19 조회 4,421
07-10-19 조회 5,786
07-10-19 조회 6,069
07-10-19 조회 3,436
07-10-19 조회 4,897
07-10-17 조회 4,572
07-10-17 조회 5,947
07-10-16 조회 4,582
07-10-15 조회 5,538
07-10-13 조회 5,197
07-10-09 조회 4,899
07-10-09 조회 4,233
07-10-09 조회 4,174
07-10-09 조회 4,729
07-10-09 조회 3,496
07-10-09 조회 3,278
07-10-09 조회 6,763
07-10-09 조회 3,908
07-10-09 조회 3,639
07-10-09 조회 3,967
07-10-09 조회 3,330
07-10-09 조회 4,375
07-10-08 조회 1.1만
07-10-05 조회 3,097
07-10-05 조회 4,032
07-10-03 조회 4,161
07-10-03 조회 3,372
07-10-03 조회 4,211
07-10-03 조회 5,231
07-10-03 조회 4,216
07-10-03 조회 3,610
07-10-03 조회 7,296
07-10-03 조회 4,874
07-10-03 조회 7,543
07-10-03 조회 3,638
07-10-03 조회 3,589
07-10-03 조회 3,588
07-10-03 조회 4,621
07-10-03 조회 4,573
07-10-03 조회 3,269
07-10-03 조회 5,123
07-10-03 조회 2,938
07-10-03 조회 2,609
07-10-03 조회 2,657
07-10-03 조회 2,865
07-10-03 조회 2,865
07-10-03 조회 4,685
07-10-02 조회 3,577
07-10-02 조회 3,104
07-10-02 조회 3,451
07-10-02 조회 5,761
07-10-02 조회 3,496
07-10-02 조회 4,119
07-10-02 조회 3,134
07-10-02 조회 4,800
07-10-02 조회 3,049
07-10-02 조회 8,876
07-10-02 조회 4,524
07-10-01 조회 2,490
07-10-01 조회 3,685
07-09-28 조회 4,706
07-09-28 조회 3,581
07-09-27 조회 3,468
07-09-27 조회 3,975
07-09-27 조회 5,026
07-09-27 조회 4,633
07-09-27 조회 3,774
07-09-27 조회 3,181
07-09-27 조회 3,225
07-09-27 조회 3,850
07-09-27 조회 3,182
07-09-15 조회 4,125
07-09-15 조회 2,860
07-09-13 조회 3,372
07-09-13 조회 2,888
07-09-13 조회 3,336
07-09-11 조회 3,577
07-09-09 조회 3,507
07-08-28 조회 3,458
07-08-28 조회 3,344
07-08-23 조회 4,645
07-08-22 조회 2,837
07-08-21 조회 4,618
07-08-21 조회 3,193
07-08-16 조회 6,472
07-08-07 조회 3,373
07-08-04 조회 3,502
07-08-04 조회 2,872
07-08-04 조회 3,288
07-08-04 조회 4,847
07-08-04 조회 2,689
07-08-04 조회 2,910
07-08-01 조회 5,539
07-08-01 조회 4,942
07-07-31 조회 4,404