#28 新增tiledMapRenderer用于渲染tiledmap
This commit is contained in:
@@ -28,6 +28,20 @@ module es {
|
||||
this.setHeight(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建一个BoxCollider并使用x/y组件作为localOffset
|
||||
* @param x
|
||||
* @param y
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
public createBoxRect(x: number, y: number, width: number, height: number): BoxCollider{
|
||||
this._localOffset = new Vector2(x + width / 2, y + width / 2);
|
||||
this.shape = new Box(width, height);
|
||||
this._colliderRequiresAutoSizing = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置BoxCollider的大小
|
||||
* @param width
|
||||
|
||||
Reference in New Issue
Block a user