@@ -521,22 +521,29 @@ -(void)setupStackTest
521
521
];
522
522
523
523
524
- CCSprite *sprite = [CCSprite spriteWithImageNamed: @" Images/ShinyBallColor.png" ];
524
+ // CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Images/ShinyBallColor.png"];
525
+ CCSprite *sprite = [[CCSprite alloc ] init ];
525
526
sprite.positionType = CCPositionTypeNormalized;
526
- sprite.position = ccp (0 .1f , 0 .9f );
527
+ sprite.position = ccp (0 .5f , 0 .5f );
527
528
sprite.scale = 0 .5f ;
528
529
529
- sprite.effect = [[CCEffectStack alloc ] initWithEffects: @[effects[9 ], effects[6 ]]];
530
+ sprite.effect = [[CCEffectStack alloc ] initWithEffects: @[effects[8 ], effects[9 ]]];
531
+ // sprite.effect = [[CCEffectStack alloc] initWithEffects:@[effects[7]]];
532
+
530
533
sprite.normalMapSpriteFrame = [CCSpriteFrame frameWithImageNamed: @" Images/ShinyBallNormals.png" ];
531
534
sprite.colorRGBA = [CCColor colorWithRed: 0 .75f green: 0 .75f blue: 0 .75f alpha: 0 .75f ];
535
+ sprite.colorRGBA = [CCColor colorWithRed: 0 .0f green: 0 .0f blue: 0 .0f alpha: 0 .0f ];
532
536
533
537
[self .contentNode addChild: sprite];
534
538
539
+ CGPoint p1 = CGPointMake (0 .1f , 0 .1f );
540
+ CGPoint p2 = CGPointMake (0 .9f , 0 .9f );
541
+
535
542
[sprite runAction: [CCActionRepeatForever actionWithAction: [CCActionSequence actions:
536
- [CCActionMoveTo actionWithDuration: 8 .0 position: ccp (0 . 9f , 0 . 9f )],
537
- [CCActionMoveTo actionWithDuration: 8 .0 position: ccp (0 . 9f , 0 . 1f )],
538
- [CCActionMoveTo actionWithDuration: 8 .0 position: ccp (0 . 1f , 0 . 1f )],
539
- [CCActionMoveTo actionWithDuration: 8 .0 position: ccp (0 . 1f , 0 . 9f )],
543
+ [CCActionMoveTo actionWithDuration: 2 .0 position: ccp (p1.x, p2.y )],
544
+ [CCActionMoveTo actionWithDuration: 4 .0 position: ccp (p2.x, p2.y )],
545
+ [CCActionMoveTo actionWithDuration: 2 .0 position: ccp (p2.x, p1.y )],
546
+ [CCActionMoveTo actionWithDuration: 4 .0 position: ccp (p1.x, p1.y )],
540
547
nil
541
548
]]];
542
549
}
0 commit comments