際際滷

際際滷Share a Scribd company logo
CCSendMessages
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
page1
//
CCCallFunc *callFunc1 = nil;
callFunc1 = [CCCallFunc actionWithTarget:self
                                selector:@selector(animationStart)];

// 2
CCCallFuncND *callFunc2 = nil;
[CCCallFuncND actionWithTarget:self
                      selector:@selector(changeSpriteAttribute:)
                          data:iconImage];

//
CCSequence *seq = [CCSequence actions:callFunc1,
                [CCDelayTime actionWithDuration:1.0],
                callFunc2,
                nil];

[iconImage runAction:seq];
page2



- (void) changeSpriteAttribute:(void *)data {

    CCSprite *sprite = (CCSprite *)data;

    sprite.scale   = 2.0;
    sprite.opacity = 128;
}
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
//
CCSendMessages *message1 = nil;
message1 = [CCSendMessages actionWithTarget:self];
[[message1 addMessage] animationStart];
// 2
CCSendMessages *message2 = nil;
message2 = [CCSendMessages actionWithTarget:iconImage];
[(CCSprite *)[message2 addMessage] setOpacity:128];
[(CCSprite *)[message2 addMessage] setScale:2.0];
CCSendMessages introduction
//
CCSendMessages *message1 = nil;
message1 = [CCSendMessages actionWithTarget:self];
[[message1 addMessage] animationStart];

// 2
CCSendMessages *message2 = nil;
message2 = [CCSendMessages
actionWithTarget:iconImage];
[(CCSprite *)[message2 addMessage] setOpacity:128];
[(CCSprite *)[message2 addMessage] setScale:2.0];

//
CCSequence *seq = nil;[CCSequence actions:
        message1,
        [CCDelayTime actionWithDuration:1.0],
        message2,
        nil];

[iconImage runAction:seq];
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction
CCSendMessages introduction

More Related Content

CCSendMessages introduction

  • 7. page1 // CCCallFunc *callFunc1 = nil; callFunc1 = [CCCallFunc actionWithTarget:self selector:@selector(animationStart)]; // 2 CCCallFuncND *callFunc2 = nil; [CCCallFuncND actionWithTarget:self selector:@selector(changeSpriteAttribute:) data:iconImage]; // CCSequence *seq = [CCSequence actions:callFunc1, [CCDelayTime actionWithDuration:1.0], callFunc2, nil]; [iconImage runAction:seq];
  • 8. page2 - (void) changeSpriteAttribute:(void *)data { CCSprite *sprite = (CCSprite *)data; sprite.scale = 2.0; sprite.opacity = 128; }
  • 18. // CCSendMessages *message1 = nil; message1 = [CCSendMessages actionWithTarget:self]; [[message1 addMessage] animationStart];
  • 19. // 2 CCSendMessages *message2 = nil; message2 = [CCSendMessages actionWithTarget:iconImage]; [(CCSprite *)[message2 addMessage] setOpacity:128]; [(CCSprite *)[message2 addMessage] setScale:2.0];
  • 21. // CCSendMessages *message1 = nil; message1 = [CCSendMessages actionWithTarget:self]; [[message1 addMessage] animationStart]; // 2 CCSendMessages *message2 = nil; message2 = [CCSendMessages actionWithTarget:iconImage]; [(CCSprite *)[message2 addMessage] setOpacity:128]; [(CCSprite *)[message2 addMessage] setScale:2.0]; // CCSequence *seq = nil;[CCSequence actions: message1, [CCDelayTime actionWithDuration:1.0], message2, nil]; [iconImage runAction:seq];

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n