Code: Select all
-(id) initWithTexture:(CCTexture2D*)texture rect:(CGRect)rect
{
NSAssert(texture!=nil, @"Invalid texture for sprite");
// IMPORTANT: [self init] and not [super init];
if( (self = [self init]) )
{
[self setTexture:texture];
[self setTextureRect:rect];
}
return self;
}
Not a good sign? The backtrace goes up to:
Code: Select all
// When a breakable box touches ground (which is set to the default/nil collision type) you win.
- (void)PostSolve_Default_BreakableBox:(cpArbiter *)arbiter space:(ChipmunkSpace*)space
{
CHIPMUNK_ARBITER_GET_SHAPES(arbiter, unused, box);
BreakableApplyDamage(box.data, arbiter, self);
}
Thanks.