This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Desired Output --> | |
A couple sentences. <br /> A few more explaining something | |
<!-- Actual Output --> | |
A couple sentences. A few more explaining something | |
<!-- The result of some testing --> | |
<!-- Input --> | |
<<b>br /> | |
<!-- Output --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "CDAudioManager.h" | |
@interface CDAudioManager (ResetBackgroundMusic) | |
-(void) resetBackgroundMusic:(CDLongAudioSource*)preloadedAudioSource; | |
@end | |
@implementation CDAudioManager (ResetBackgroundMusic) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
@interface TGScoreLabel : CCLabelTTF { | |
double curScore_; // the current score value of the label | |
BOOL updating_; // if we currently have an update running | |
double interval_; // how long we wait between updates | |
int score; // the target score | |
NSString * formatString; // the string that we format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) rollToScore:(int)newScore { | |
self.score = newScore; | |
if (!updating_) { | |
updating_ = TRUE; | |
[self schedule:@selector(update_:) interval:interval_]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
@interface TGScoreLabel : CCLabelTTF { | |
double curScore_; // the current score value of the label | |
BOOL updating_; // if we currently have an update running | |
double interval_; // how long we wait between updates | |
int score; // the target score | |
NSString * formatString; // the string that we format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "TGScoreLabel.h" | |
-(void) setupPercentComplete { | |
TGScoreLabel * myScoreLabel = [TGScoreLabel scoreLabelWithFormatString:@"%d%%!" score:0 dimensions:CGSizeMake(380, 45) alignment:UITextAlignmentRight fontName:@"TacoGraveyard" fontSize:36]; | |
myScoreLabel.position = myScoreLabelPosition; | |
[self addChild:myScoreLabel]; | |
[myScore rollToScore: percentComplete]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) update_:(ccTime)dt { | |
int direction = 1; // the score can roll in either direction | |
if (self.score < curScore_) { | |
direction = -1; | |
} | |
double pointChange = self.pointsPerSecond * direction * dt; | |
curScore_ += pointChange; | |
// don't let it overrun the target | |
if (direction == -1 && curScore_ < self.score) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
@interface CCSpriteFrameCache (SWF) | |
-(void) addSpriteFramesWithSWF:(NSString*)filename; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CCSpriteFrameCache_SWF.h | |
// CCSpriteFrameCache_SWF_Extension | |
// | |
// Created by Salvatore Gionfriddo on 11/28/11. | |
// Copyright (c) 2011 Taco Graveyard. All rights reserved. | |
// | |
#include <vg/openvg.h> | |
#include <vg/vgu.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface NSMutableArray (Shuffling) | |
-(void) shuffle; | |
@end |
OlderNewer