Hi,
I had it working once, now I can't figure it out again: I am trying to move sprites that are contained within a single NSMutableArray manually, updating the sprites position in my tick function:
// Move Pieces
for(CCSprite *curSprite in _movableObjects) {
if(curSprite.tag == 10) {
if(_now - _pieceLastMoved >= _pieceSpeed) {
curSprite.position = ccp(curSprite.position.x,curSprite.position.y - 1);
_pieceLastMoved = _now;
}
}
}
This chunk is suppose to search the array "_movableObjects" for any sprites with tag of 10 and move them. It works fine for the first sprite, it moves downwards as the code suggests, but then none of the other sprites follow as they should. I know it works someway similar to this because I've done it once. I must be missing something. No matter what I try, only the first sprite likes to mock me by working properly. Thanks for your consideration :)