kingBook

导航

2020年7月20日 #

CocosCreator 物理引擎中的碰撞平面的法线

摘要: CocosCreator使用的是box2d.js物理引擎,碰撞平面法线方向必须取反 private onBeginContact(contact:cc.PhysicsContact,selfCollider:cc.PhysicsCollider,otherCollider:cc.PhysicsCol 阅读全文

posted @ 2020-07-20 14:28 kingBook 阅读(792) 评论(0) 推荐(0) 编辑

TypeScript 获取类名

摘要: console.log(this.constructor.name); // 第三方类 console.log(StateDefault.prototype.constructor.name); 使用泛型时,获取泛型类名: export class Test { constructor() { th 阅读全文

posted @ 2020-07-20 10:26 kingBook 阅读(1285) 评论(0) 推荐(0) 编辑