Hey I am trying to move some sprites at the same time, they are all the same type of sprite.So I just used a for loop to add the sprite in the game but when I try to move all of the sprites only one moves.
I am trying to simulate running , when the user taps on the Stone the stone will move down and another stone will appear at the top there will be 4 stones so when one goes down another will come on the top and they rest of the stones will move down. I am haveing trouble moveing the stone that comes on the top of the screen that stone doesn't move like the other stones .
Here is some of the Code:
self.Stone = [Stone spriteNodeWithColor:[SKColor blackColor] size:CGSizeMake(80, 142)];
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInNode:self];
self.node =[self nodeAtPoint:location];
if ([self.node.name isEqualToString:@"stone"]) {
SKAction *hey = [SKAction moveToY:self.Stone.position.y - 142 duration:1];
[self runAction:hey];
}
They are basically going to be 4 stones on the screen and each time you tap the stones move down.