June 2014
Beginner to intermediate
434 pages
9h 49m
English
It is time to use our win and lose fonts. Perform the following steps:
GameScene.m file, and add another z-order value at the top:typedef NS_ENUM(NSUInteger, Z_ORDER)
{
Z_BACKGROUND,
Z_BATCH_NODE,
Z_LABELS,
Z_HUD
};displayWinLoseLabelWithText: method below the won and lost methods:-(void)displayWinLoseLabelWithText:(NSString *)text andFont:(NSString *)fontFileName { CGSize viewSize = [CCDirector sharedDirector].viewSize; CCLabelBMFont *label = [CCLabelBMFont labelWithString:text fntFile:fontFileName]; label.position = ccp(viewSize.width * 0.5f, viewSize.height * 0.75f); [self addChild:label z:Z_LABELS]; label.scale = 0.01f; CCActionScaleTo *scaleUp = [CCActionScaleTo ...