Skip to content

Commit 67b4067

Browse files
author
Thayer J Andrews
committed
CCEffectsTest - Update the stack test
Stack refraction then reflection to make sure the results are the same as glass. They are so long as everything is configured correctly.
1 parent 12aac7e commit 67b4067

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

cocos2d-ui-tests/tests/CCEffectsTest.m

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -521,22 +521,29 @@ -(void)setupStackTest
521521
];
522522

523523

524-
CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Images/ShinyBallColor.png"];
524+
// CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Images/ShinyBallColor.png"];
525+
CCSprite *sprite = [[CCSprite alloc] init];
525526
sprite.positionType = CCPositionTypeNormalized;
526-
sprite.position = ccp(0.1f, 0.9f);
527+
sprite.position = ccp(0.5f, 0.5f);
527528
sprite.scale = 0.5f;
528529

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+
530533
sprite.normalMapSpriteFrame = [CCSpriteFrame frameWithImageNamed:@"Images/ShinyBallNormals.png"];
531534
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];
532536

533537
[self.contentNode addChild:sprite];
534538

539+
CGPoint p1 = CGPointMake(0.1f, 0.1f);
540+
CGPoint p2 = CGPointMake(0.9f, 0.9f);
541+
535542
[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)],
540547
nil
541548
]]];
542549
}

0 commit comments

Comments
 (0)