-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.m
executable file
·79 lines (58 loc) · 2.38 KB
/
AppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// AppDelegate.m
// Astral_Cocos3.0
//
// Created by Timothy J on 28/08/14.
// Copyright timothy j 2014. All rights reserved.
//
// -----------------------------------------------------------------------
#import "AppDelegate.h"
#import "IntroScene.h"
#import "HelloWorldScene.h"
@implementation AppDelegate
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//PURE DATA INITIALIZATION ---------------------------------------
/*
self.ac = [[PdAudioController alloc] init];
[self.ac configurePlaybackWithSampleRate:22050 numberChannels:1 inputEnabled:NO mixingEnabled:NO];
[self.ac configureTicksPerBuffer:4];
[PdBase addToSearchPath:@"/puredata/"];
[PdBase openFile:@"/patch.pd" path:[[NSBundle mainBundle] resourcePath]];
[self.ac setActive:YES];
*/
[CCBReader configureCCFileUtils];
// This is the only app delegate method you need to implement when inheriting from CCAppDelegate.
// This method is a good place to add one time setup code that only runs when your app is first launched.
// Setup Cocos2D with reasonable defaults for everything.
// There are a number of simple options you can change.
// If you want more flexibility, you can configure Cocos2D yourself instead of calling setupCocos2dWithOptions:.
[self setupCocos2dWithOptions:@{
// Show the FPS and draw call label.
CCSetupShowDebugStats: @(YES),
// More examples of options you might want to fiddle with:
// (See CCAppDelegate.h for more information)
// Use a 16 bit color buffer:
// CCSetupPixelFormat: kEAGLColorFormatRGB565,
// Use a simplified coordinate system that is shared across devices.
// CCSetupScreenMode: CCScreenModeFixed,
// Run in portrait mode.
// CCSetupScreenOrientation: CCScreenOrientationPortrait,
// Run at a reduced framerate.
// CCSetupAnimationInterval: @(1.0/30.0),
// Run the fixed timestep extra fast.
// CCSetupFixedUpdateInterval: @(1.0/180.0),
// Make iPad's act like they run at a 2x content scale. (iPad retina 4x)
// CCSetupTabletScale2X: @(YES),
CCSetupScreenMode: CCScreenOrientationLandscape,
}];
// NSLog(CC);
return YES;
}
-(CCScene *)startScene
{
// This method should return the very first scene to be run when your app starts.
return [IntroScene scene];
//return [CCBReader loadAsScene:@"MainScene"];
}
@end