新增shape形状
This commit is contained in:
@@ -5,6 +5,8 @@ class Composite {
|
||||
public drawParticles: boolean = true;
|
||||
public drawConstraints: boolean = true;
|
||||
public particles: Particle[] = [];
|
||||
public collidesWithLayers = -1;
|
||||
|
||||
/**
|
||||
* 处理解决所有约束条件
|
||||
*/
|
||||
@@ -48,6 +50,13 @@ class Composite {
|
||||
}
|
||||
}
|
||||
|
||||
public handleConstraintCollisions(){
|
||||
for (let i = this._constraints.length - 1; i >= 0; i --){
|
||||
if (this._constraints[i].collidesWithColliders)
|
||||
this._constraints[i].handleCollisions(this.collidesWithLayers);
|
||||
}
|
||||
}
|
||||
|
||||
public debugRender(graphics: egret.Graphics){
|
||||
if (this.drawConstraints){
|
||||
for (let i = 0; i < this._constraints.length; i ++){
|
||||
|
||||
Reference in New Issue
Block a user