1
    blue = [CCMenuItemImage itemFromNormalImage:@"blue.png" selectedImage:@"blueclick.png"];
    [blue setPosition:ccp(175, 350)];
    blue.scale = .75;
    [self addChild:blue  z: 5];



 id move = [CCMoveBy actionWithDuration:1.0f position:CGPointMake(334, 321.75)];
    [blue runAction:move];

为什么单击它时它不会变为第二个图像(blueclick.png)?另外,我将如何延迟此功能?

4

1 回答 1

0

尝试使用此代码延迟运行操作:

      id delay    = [CCDelayTime actionWithDuration:delay];
      id move     = [CCMoveTo actionWithDuration:0.4 position:ccp(x, y)];
      id sequence = [CCSequence actions:delay, move, nil];
      [card.sprite runAction:sequence];
于 2013-03-19T04:26:17.617 回答