新增渲染接口

This commit is contained in:
yhh
2021-05-27 18:32:38 +08:00
parent 6c44d38c10
commit 26068aaf6f
29 changed files with 1301 additions and 96 deletions

View File

@@ -3,7 +3,7 @@ module es {
export class Physics {
public static _spatialHash: SpatialHash;
/** 用于在全局范围内存储重力值的方便字段 */
public static gravity = new Vector2(0, 300);
public static gravity = new Vector2(0, -300);
/** 调用reset并创建一个新的SpatialHash时使用的单元格大小 */
public static spatialHashCellSize = 100;
/** 接受layerMask的所有方法的默认值 */
@@ -42,6 +42,10 @@ module es {
this._spatialHash.clear();
}
public static debugDraw(secondsToDisplay) {
this._spatialHash.debugDraw(secondsToDisplay);
}
/**
* 检查是否有对撞机落在一个圆形区域内。返回遇到的第一个对撞机
* @param center