You have an endless loop:
while([self getchildByTag:331].numberofrunningactions > 0)
{
NSLog(..);
continue;
}
The continue
statement will exit the current block to re-evaluate the while
condition, which is true, which will do a continue
, and re-evaluate the while
condition, and so on for all eternity.
Instead try this:
if ([self getchildByTag:331].numberofrunningactions > 0)
{
NSLog(..);
}
and call the checkActionCount
method from a scheduled selector, for instace update:
, so that the condition is evaluated once every frame.