I have a method to add an enemy, and I want to know how I can make it so I run it a certain number of times (say 10). I call the method with a scheduler in cocos2d and by doing [self addEnemy];
Need any more info?
I have a method to add an enemy, and I want to know how
Share
If the selector you schedule is
methodA:then a simple way to do what you are looking for is:
If you prefer it, you could use an ivar in your class to track the number of repetitions.