Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkemose committed Aug 20, 2015
0 parents commit f20bc34
Show file tree
Hide file tree
Showing 481 changed files with 115,689 additions and 0 deletions.
Binary file added iTunesArtwork
Binary file not shown.
Binary file added iTunesArtwork@2x
Binary file not shown.
2,099 changes: 2,099 additions & 0 deletions pong-objc.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E8B1B860ECA00CAA1FE"
BuildableName = "libObjectiveChipmunk.a"
BlueprintName = "ObjectiveChipmunk"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E8B1B860ECA00CAA1FE"
BuildableName = "libObjectiveChipmunk.a"
BlueprintName = "ObjectiveChipmunk"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E8B1B860ECA00CAA1FE"
BuildableName = "libObjectiveChipmunk.a"
BlueprintName = "ObjectiveChipmunk"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E871B860ECA00CAA1FE"
BuildableName = "pong-objc.app"
BlueprintName = "pong-objc"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E871B860ECA00CAA1FE"
BuildableName = "pong-objc.app"
BlueprintName = "pong-objc"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E871B860ECA00CAA1FE"
BuildableName = "pong-objc.app"
BlueprintName = "pong-objc"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0E4B6E871B860ECA00CAA1FE"
BuildableName = "pong-objc.app"
BlueprintName = "pong-objc"
ReferencedContainer = "container:pong-objc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>ObjectiveChipmunk.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>pong-objc.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>0E4B6E871B860ECA00CAA1FE</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>0E4B6E8B1B860ECA00CAA1FE</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
55 changes: 55 additions & 0 deletions pong-objc/Classes/AppDelegate.h
@@ -0,0 +1,55 @@
//
// AppDelegate.h
//
// Created by : Lars Birkemose
// Project : pong-objc
// Date : 20/08/15
//
// Copyright (c) 2015 Cocos2D.
// All rights reserved.
//
// -----------------------------------------------------------------

#import <Foundation/Foundation.h>
#import "cocos2d.h"

// -----------------------------------------------------------------------

@interface AppDelegate : CCAppDelegate

// -----------------------------------------------------------------------

@end

































109 changes: 109 additions & 0 deletions pong-objc/Classes/AppDelegate.m
@@ -0,0 +1,109 @@
//
// AppDelegate.m
//
// Created by : Lars Birkemose
// Project : pong-objc
// Date : 20/08/15
//
// Copyright (c) 2015 Cocos2D.
// All rights reserved.
//
// -----------------------------------------------------------------

#import "AppDelegate.h"
#import "LoadScene.h"
#import "MainScene.h"

// -----------------------------------------------------------------------

@implementation AppDelegate

// -----------------------------------------------------------------------
// This is where your app starts. It takes two steps
// 1) Setting up Cocos2D, which is done with setupCocos2dWithOptions
// 2) Call your first scene, which is done by overriding startScene

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Cocos2D takes a dictionary to start ... yeah I know ... but it does, and it is kind of neat
NSMutableDictionary *startUpOptions = [NSMutableDictionary dictionary];

// Let's add some setup stuff

// File extensions
// You can use anything you want, and completely dropping extensions will in most cases automatically scale the artwork correct
// To make it easy to understand what resolutions I am using, I have changed this for this demo to -4x -2x and -1x
// Notice that I deliberately added some of the artwork without extensions
[CCFileUtils sharedFileUtils].suffixesDict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
@"-2x", CCFileUtilsSuffixiPad,
@"-4x", CCFileUtilsSuffixiPadHD,
@"-1x", CCFileUtilsSuffixiPhone,
@"-1x", CCFileUtilsSuffixiPhoneHD,
@"-1x", CCFileUtilsSuffixiPhone5,
@"-2x", CCFileUtilsSuffixiPhone5HD,
@"", CCFileUtilsSuffixDefault,
nil];

// Show FPS
// We really want this when developing an app
[startUpOptions setObject:@(YES) forKey:CCSetupShowDebugStats];

// A acouple of other examples

// Use a 16 bit color buffer
// This will lower the color depth from 32 bits to 16 bits for that extra performance
// Most will want 32, so we disbaled it
// ---
// [startUpOptions setObject:kEAGLColorFormatRGB565 forKey:CCSetupPixelFormat];

// Use a simplified coordinate system that is shared across devices
// Normally you work in the coordinate of the device (an iPad is 1024x768, an iPhone 4 480x320 and so on)
// This feature makes it easier to use the same setup for all devices (easier is a relative term)
// Most will want to handle iPad and iPhone exclusively, so it is disabled by default
// ---
// [startUpOptions setObject:CCScreenModeFixed forKey:CCSetupScreenMode];

// All the supported keys can be found in CCConfiguration.h

// We are done ...
// Lets get this thing on the road!
[self setupCocos2dWithOptions:startUpOptions];

// Stay positive. Always return a YES :)
return YES;
}

// -----------------------------------------------------------------------
// This method should return the very first scene to be run when your app starts.

- (CCScene *)startScene
{
return [LoadScene new];
}

// -----------------------------------------------------------------------

@end























0 comments on commit f20bc34

Please sign in to comment.