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
@protocol LoadableDelegate; | |
@protocol Loadable | |
- (void) loadWithDelegate: (id <LoadableDelegate>) delegate; | |
- (BOOL) loadingUsesOpenGL; | |
@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
#import "Loadable.h" | |
@protocol LoadableDelegate | |
- (void) loadable: (id <Loadable>) ldble reportingProgress: (float) progrs; | |
@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
// | |
// Loader.m | |
// MatchUp | |
// | |
// Created by Thomas Visser on 12/06/2009. | |
// Copyright 2009 __MyCompanyName__. All rights reserved. | |
// | |
#import "Loader.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
// | |
// Loader.h | |
// MatchUp | |
// | |
// Created by Thomas Visser on 12/06/2009. | |
// Copyright 2009 __MyCompanyName__. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "Loadable.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
// Created by Thomas Visser on 10/10/2009. | |
#import "cocos2d.h" | |
#import "LoadableDelegate.h" | |
@class LoadProgressLayer, GameLayer; | |
@interface GameScene : Scene <LoadableDelegate> { | |
LoadProgressLayer * loadLayer; // a layer displaying the progress | |
GameLayer * gameLayer; // the layer that has to be loaded |
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
// Created by Thomas Visser on 10/10/2009. | |
#import "GameScene.h" | |
#import "LoadProgressLayer.h" | |
#import "GameLayer.h" | |
#import "Loader.h" | |
@implementation GameScene | |
- (id) init { |
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
// Created by Thomas Visser on 10/10/2009./ | |
#import "cocos2d.h" | |
@interface LoadProgressLayer : Layer { | |
} | |
- (void) displayProgress: (float) prgs; |
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
// Created by Thomas Visser on 10/10/2009. | |
#import "LoadProgressLayer.h" | |
@implementation LoadProgressLayer | |
- (void) displayProgress: (float) prgs { | |
// update a loading bar, but for now, we'll just NSLog the progress | |
NSLog(@"Displaying progress: %f", prgs); |
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
// Created by Thomas Visser on 10/10/2009. | |
#import "cocos2d.h" | |
#import "Loadable.h" | |
#import "LoadableDelegate.h" | |
@interface GameLayer : Layer <Loadable, LoadableDelegate> { | |
NSArray * gameElements; | |
id loadDelegate; | |
} |
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
// Created by Thomas Visser on 10/10/2009. | |
#import "GameLayer.h" | |
#import "LoadableDelegate.h" | |
#import "GraphicObject.h" | |
#import "Loader.h" | |
@implementation GameLayer | |
- (id) init { |
OlderNewer