Box2D 碰撞组(collisiongroup)容许你指定一个整数的组索引值,你能够设置具备相同组索引值的装置发生碰撞(正索引),也能够设置全部具备相同组索引值的装置不会彼此碰撞(负索引)android
Layabox RigidBody group 设置 ide
A B 工具
0 0 碰撞gradle
0 1 碰撞ui
1 1 碰撞this
-1 -2 碰撞google
-1 0 碰撞spa
-1 -1 不碰撞code
private counter: number = 0; public StartCounter() { for (let i = 0; i < 2; i++) { Laya.timer.once(3000, this, ()=>{ console.log(++this.counter); }); } } Console 1 2 没有覆盖前面的 public CounterFunction() { console.log(++this.counter); } public StartCounter() { for (let i = 0; i < 2; i++) { Laya.timer.once(3000, this, this.CounterFunction); } } Console 1 覆盖了前面的
Layaboxblog
Native版本 release-v2.0.2
Android Studio
buildscript { repositories { google() jcenter() } dependecies { classpath: 'com.android.tools.build:gradle:3.1.2" } } allprojects { repositories { google() jcenter() } }
sdkmanager --licenses
百度小游戏
https://smartprogram.baidu.com/docs/game/tutorials/howto/dev/