File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,20 @@ - (void)setupVertexZTest
73
73
// add a card node to hold the cards
74
74
_cardNode = [CCSpriteBatchNode batchNodeWithFile: @" Cards/cards.classic.png" ];
75
75
_cardNode.contentSize = [CCDirector sharedDirector ].viewSize ;
76
+
77
+ _cardNode.shaderProgram = [[CCShaderCache sharedShaderCache ] programForKey: kCCShader_PositionTextureColorAlphaTest ];
78
+ GLint location = [_cardNode.shaderProgram uniformLocationForName: @(kCCUniformAlphaTestValue_s )];
79
+ [_cardNode.shaderProgram setUniformLocation: location withF1: 0.5 ];
80
+
76
81
[self .contentNode addChild: _cardNode];
77
82
78
83
// add an array of cards
79
84
for (int count = 0 ; count < NUMBER_OF_CARDS; count ++)
80
85
{
81
86
CCSprite *card = [CCSprite spriteWithImageNamed: [self randomCard ]];
87
+
82
88
card.positionType = CCPositionTypeNormalized;
83
- card.position = ccp (0.5 + (count - NUMBER_OF_CARDS / 2 ) * 0.02 , 0.5 );
89
+ card.position = ccp (0.5 + (count - NUMBER_OF_CARDS / 2 ) * 0.02 , 0.5 + (count - NUMBER_OF_CARDS / 2 ) * 0.01 );
84
90
[_cardNode addChild: card];
85
91
}
86
92
}
You can’t perform that action at this time.
0 commit comments