mirror of https://github.com/axmolengine/axmol.git
Add test for PhysicsSprite bug#11618
This commit is contained in:
parent
b034268331
commit
9393daaf8f
|
@ -132,6 +132,15 @@ var ChipmunkSprite = ChipmunkBaseLayer.extend( {
|
||||||
|
|
||||||
this.addSprite = function( pos ) {
|
this.addSprite = function( pos ) {
|
||||||
var sprite = this.createPhysicsSprite( pos );
|
var sprite = this.createPhysicsSprite( pos );
|
||||||
|
var child = new cc.Sprite(s_pathSister1);
|
||||||
|
child.attr({
|
||||||
|
scale: 0.4,
|
||||||
|
anchorX: 0,
|
||||||
|
anchorY: 0,
|
||||||
|
x: sprite.width/2,
|
||||||
|
y: sprite.height/2
|
||||||
|
});
|
||||||
|
sprite.addChild(child);
|
||||||
this.addChild( sprite );
|
this.addChild( sprite );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -231,6 +240,15 @@ var ChipmunkSpriteBatchTest = ChipmunkSprite.extend( {
|
||||||
|
|
||||||
this.addSprite = function( pos ) {
|
this.addSprite = function( pos ) {
|
||||||
var sprite = this.createPhysicsSprite( pos );
|
var sprite = this.createPhysicsSprite( pos );
|
||||||
|
var child = new cc.Sprite(s_pathGrossini);
|
||||||
|
child.attr({
|
||||||
|
scale: 0.4,
|
||||||
|
anchorX: 0,
|
||||||
|
anchorY: 0,
|
||||||
|
x: sprite.width/2,
|
||||||
|
y: sprite.height/2
|
||||||
|
});
|
||||||
|
sprite.addChild(child);
|
||||||
this.batch.addChild( sprite );
|
this.batch.addChild( sprite );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue