Skip to content

Commit

Permalink
更新了球自由落体后反弹动画
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo501 committed Nov 21, 2019
1 parent 06fba57 commit d68007f
Show file tree
Hide file tree
Showing 8 changed files with 522 additions and 28 deletions.
16 changes: 4 additions & 12 deletions BassFalling/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# 模拟球弹跳

* 定义两个变量,一个speed,一个accelerate。
* 设置 ball 与 ground 为BoxCollider。检测下落碰撞,设置speed为defaultSpeed
* 在update中设置代码
~~~
/**
* 球运动计算
*/
drop() {
this.node.y += this.speed;
this.speed += this.accelerate;
}
~~~


### 参考
* http://gaozhongwuli.com/top/481764.html
Loading

0 comments on commit d68007f

Please sign in to comment.