1

如何使用调度功能的参数

 [self schedule:@selector(cloudMovement:cloud1) interval:1/30];

-(void)cloudMovement:(CCSprite*)cloud
{
CGSize size = [[CCDirector sharedDirector] winSize];

  if (cloud.position.x == size.width )
  {
    [cloud setPosition:ccp(0,size.height-100)];
    [cloud runAction:[CCMoveTo actionWithDuration:20 position:ccp(size.width,size.height-100)]];
  }
}
4

0 回答 0