diff --git a/Dynamic Animation Game.xcodeproj/project.pbxproj b/Dynamic Animation Game.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0bdb4d5 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/project.pbxproj @@ -0,0 +1,441 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 054D19E11BFF468A00D53644 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D19E01BFF468A00D53644 /* AppDelegate.swift */; }; + 054D19E41BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 054D19E21BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld */; }; + 054D19E61BFF468A00D53644 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D19E51BFF468A00D53644 /* ViewController.swift */; }; + 054D19E91BFF468A00D53644 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 054D19E71BFF468A00D53644 /* Main.storyboard */; }; + 054D19EB1BFF468A00D53644 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 054D19EA1BFF468A00D53644 /* Images.xcassets */; }; + 054D19EE1BFF468A00D53644 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 054D19EC1BFF468A00D53644 /* LaunchScreen.xib */; }; + 054D19FA1BFF468A00D53644 /* Dynamic_Animation_GameTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D19F91BFF468A00D53644 /* Dynamic_Animation_GameTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 054D19F41BFF468A00D53644 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 054D19D31BFF468A00D53644 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 054D19DA1BFF468A00D53644; + remoteInfo = "Dynamic Animation Game"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 054D19DB1BFF468A00D53644 /* Dynamic Animation Game.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Dynamic Animation Game.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 054D19DF1BFF468A00D53644 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 054D19E01BFF468A00D53644 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 054D19E31BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Dynamic_Animation_Game.xcdatamodel; sourceTree = ""; }; + 054D19E51BFF468A00D53644 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 054D19E81BFF468A00D53644 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 054D19EA1BFF468A00D53644 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 054D19ED1BFF468A00D53644 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 054D19F31BFF468A00D53644 /* Dynamic Animation GameTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Dynamic Animation GameTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 054D19F81BFF468A00D53644 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 054D19F91BFF468A00D53644 /* Dynamic_Animation_GameTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dynamic_Animation_GameTests.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 054D19D81BFF468A00D53644 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 054D19F01BFF468A00D53644 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 054D19D21BFF468A00D53644 = { + isa = PBXGroup; + children = ( + 054D19DD1BFF468A00D53644 /* Dynamic Animation Game */, + 054D19F61BFF468A00D53644 /* Dynamic Animation GameTests */, + 054D19DC1BFF468A00D53644 /* Products */, + ); + sourceTree = ""; + }; + 054D19DC1BFF468A00D53644 /* Products */ = { + isa = PBXGroup; + children = ( + 054D19DB1BFF468A00D53644 /* Dynamic Animation Game.app */, + 054D19F31BFF468A00D53644 /* Dynamic Animation GameTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 054D19DD1BFF468A00D53644 /* Dynamic Animation Game */ = { + isa = PBXGroup; + children = ( + 054D19E01BFF468A00D53644 /* AppDelegate.swift */, + 054D19E51BFF468A00D53644 /* ViewController.swift */, + 054D19E71BFF468A00D53644 /* Main.storyboard */, + 054D19EA1BFF468A00D53644 /* Images.xcassets */, + 054D19EC1BFF468A00D53644 /* LaunchScreen.xib */, + 054D19E21BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld */, + 054D19DE1BFF468A00D53644 /* Supporting Files */, + ); + path = "Dynamic Animation Game"; + sourceTree = ""; + }; + 054D19DE1BFF468A00D53644 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 054D19DF1BFF468A00D53644 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 054D19F61BFF468A00D53644 /* Dynamic Animation GameTests */ = { + isa = PBXGroup; + children = ( + 054D19F91BFF468A00D53644 /* Dynamic_Animation_GameTests.swift */, + 054D19F71BFF468A00D53644 /* Supporting Files */, + ); + path = "Dynamic Animation GameTests"; + sourceTree = ""; + }; + 054D19F71BFF468A00D53644 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 054D19F81BFF468A00D53644 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 054D19DA1BFF468A00D53644 /* Dynamic Animation Game */ = { + isa = PBXNativeTarget; + buildConfigurationList = 054D19FD1BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation Game" */; + buildPhases = ( + 054D19D71BFF468A00D53644 /* Sources */, + 054D19D81BFF468A00D53644 /* Frameworks */, + 054D19D91BFF468A00D53644 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Dynamic Animation Game"; + productName = "Dynamic Animation Game"; + productReference = 054D19DB1BFF468A00D53644 /* Dynamic Animation Game.app */; + productType = "com.apple.product-type.application"; + }; + 054D19F21BFF468A00D53644 /* Dynamic Animation GameTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 054D1A001BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation GameTests" */; + buildPhases = ( + 054D19EF1BFF468A00D53644 /* Sources */, + 054D19F01BFF468A00D53644 /* Frameworks */, + 054D19F11BFF468A00D53644 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 054D19F51BFF468A00D53644 /* PBXTargetDependency */, + ); + name = "Dynamic Animation GameTests"; + productName = "Dynamic Animation GameTests"; + productReference = 054D19F31BFF468A00D53644 /* Dynamic Animation GameTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 054D19D31BFF468A00D53644 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0630; + ORGANIZATIONNAME = "Liguo Jiao"; + TargetAttributes = { + 054D19DA1BFF468A00D53644 = { + CreatedOnToolsVersion = 6.3; + }; + 054D19F21BFF468A00D53644 = { + CreatedOnToolsVersion = 6.3; + TestTargetID = 054D19DA1BFF468A00D53644; + }; + }; + }; + buildConfigurationList = 054D19D61BFF468A00D53644 /* Build configuration list for PBXProject "Dynamic Animation Game" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 054D19D21BFF468A00D53644; + productRefGroup = 054D19DC1BFF468A00D53644 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 054D19DA1BFF468A00D53644 /* Dynamic Animation Game */, + 054D19F21BFF468A00D53644 /* Dynamic Animation GameTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 054D19D91BFF468A00D53644 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 054D19E91BFF468A00D53644 /* Main.storyboard in Resources */, + 054D19EE1BFF468A00D53644 /* LaunchScreen.xib in Resources */, + 054D19EB1BFF468A00D53644 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 054D19F11BFF468A00D53644 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 054D19D71BFF468A00D53644 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 054D19E61BFF468A00D53644 /* ViewController.swift in Sources */, + 054D19E41BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld in Sources */, + 054D19E11BFF468A00D53644 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 054D19EF1BFF468A00D53644 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 054D19FA1BFF468A00D53644 /* Dynamic_Animation_GameTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 054D19F51BFF468A00D53644 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 054D19DA1BFF468A00D53644 /* Dynamic Animation Game */; + targetProxy = 054D19F41BFF468A00D53644 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 054D19E71BFF468A00D53644 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 054D19E81BFF468A00D53644 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 054D19EC1BFF468A00D53644 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 054D19ED1BFF468A00D53644 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 054D19FB1BFF468A00D53644 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 054D19FC1BFF468A00D53644 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 054D19FE1BFF468A00D53644 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = "Dynamic Animation Game/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 054D19FF1BFF468A00D53644 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = "Dynamic Animation Game/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 054D1A011BFF468A00D53644 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "Dynamic Animation GameTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dynamic Animation Game.app/Dynamic Animation Game"; + }; + name = Debug; + }; + 054D1A021BFF468A00D53644 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = "Dynamic Animation GameTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dynamic Animation Game.app/Dynamic Animation Game"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 054D19D61BFF468A00D53644 /* Build configuration list for PBXProject "Dynamic Animation Game" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 054D19FB1BFF468A00D53644 /* Debug */, + 054D19FC1BFF468A00D53644 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 054D19FD1BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation Game" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 054D19FE1BFF468A00D53644 /* Debug */, + 054D19FF1BFF468A00D53644 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 054D1A001BFF468A00D53644 /* Build configuration list for PBXNativeTarget "Dynamic Animation GameTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 054D1A011BFF468A00D53644 /* Debug */, + 054D1A021BFF468A00D53644 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 054D19E21BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 054D19E31BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodel */, + ); + currentVersion = 054D19E31BFF468A00D53644 /* Dynamic_Animation_Game.xcdatamodel */; + path = Dynamic_Animation_Game.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 054D19D31BFF468A00D53644 /* Project object */; +} diff --git a/Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0e829e2 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Dynamic Animation Game.xcodeproj/project.xcworkspace/xcuserdata/Liguo_Jiao.xcuserdatad/UserInterfaceState.xcuserstate b/Dynamic Animation Game.xcodeproj/project.xcworkspace/xcuserdata/Liguo_Jiao.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..9904b16 Binary files /dev/null and b/Dynamic Animation Game.xcodeproj/project.xcworkspace/xcuserdata/Liguo_Jiao.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..288c83f --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,39 @@ + + + + + + + + + + + + + diff --git a/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme new file mode 100644 index 0000000..18f8aa9 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/Dynamic Animation Game.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..eae8a80 --- /dev/null +++ b/Dynamic Animation Game.xcodeproj/xcuserdata/Liguo_Jiao.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + Dynamic Animation Game.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 054D19DA1BFF468A00D53644 + + primary + + + 054D19F21BFF468A00D53644 + + primary + + + + + diff --git a/Dynamic Animation Game/AppDelegate.swift b/Dynamic Animation Game/AppDelegate.swift new file mode 100644 index 0000000..473d284 --- /dev/null +++ b/Dynamic Animation Game/AppDelegate.swift @@ -0,0 +1,111 @@ +// +// AppDelegate.swift +// Dynamic Animation Game +// +// Created by Liguo Jiao on 21/11/15. +// Copyright (c) 2015 Liguo Jiao. All rights reserved. +// + +import UIKit +import CoreData + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Saves changes in the application's managed object context before the application terminates. + self.saveContext() + } + + // MARK: - Core Data stack + + lazy var applicationDocumentsDirectory: NSURL = { + // The directory the application uses to store the Core Data store file. This code uses a directory named "McKay.Dynamic_Animation_Game" in the application's documents Application Support directory. + let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) + return urls[urls.count-1] as! NSURL + }() + + lazy var managedObjectModel: NSManagedObjectModel = { + // The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model. + let modelURL = NSBundle.mainBundle().URLForResource("Dynamic_Animation_Game", withExtension: "momd")! + return NSManagedObjectModel(contentsOfURL: modelURL)! + }() + + lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = { + // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. + // Create the coordinator and store + var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel) + let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("Dynamic_Animation_Game.sqlite") + var error: NSError? = nil + var failureReason = "There was an error creating or loading the application's saved data." + if coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil, error: &error) == nil { + coordinator = nil + // Report any error we got. + var dict = [String: AnyObject]() + dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data" + dict[NSLocalizedFailureReasonErrorKey] = failureReason + dict[NSUnderlyingErrorKey] = error + error = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict) + // Replace this with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog("Unresolved error \(error), \(error!.userInfo)") + abort() + } + + return coordinator + }() + + lazy var managedObjectContext: NSManagedObjectContext? = { + // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail. + let coordinator = self.persistentStoreCoordinator + if coordinator == nil { + return nil + } + var managedObjectContext = NSManagedObjectContext() + managedObjectContext.persistentStoreCoordinator = coordinator + return managedObjectContext + }() + + // MARK: - Core Data Saving support + + func saveContext () { + if let moc = self.managedObjectContext { + var error: NSError? = nil + if moc.hasChanges && !moc.save(&error) { + // Replace this implementation with code to handle the error appropriately. + // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. + NSLog("Unresolved error \(error), \(error!.userInfo)") + abort() + } + } + } + +} + diff --git a/Dynamic Animation Game/Base.lproj/LaunchScreen.xib b/Dynamic Animation Game/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..156c248 --- /dev/null +++ b/Dynamic Animation Game/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dynamic Animation Game/Base.lproj/Main.storyboard b/Dynamic Animation Game/Base.lproj/Main.storyboard new file mode 100644 index 0000000..2fd29ad --- /dev/null +++ b/Dynamic Animation Game/Base.lproj/Main.storyboard @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..b692205 --- /dev/null +++ b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + Dynamic_Animation_Game.xcdatamodel + + diff --git a/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents new file mode 100644 index 0000000..193f33c --- /dev/null +++ b/Dynamic Animation Game/Dynamic_Animation_Game.xcdatamodeld/Dynamic_Animation_Game.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json b/Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/Dynamic Animation Game/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Dynamic Animation Game/Info.plist b/Dynamic Animation Game/Info.plist new file mode 100644 index 0000000..09af34e --- /dev/null +++ b/Dynamic Animation Game/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + McKay.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Dynamic Animation Game/ViewController.swift b/Dynamic Animation Game/ViewController.swift new file mode 100644 index 0000000..44549ec --- /dev/null +++ b/Dynamic Animation Game/ViewController.swift @@ -0,0 +1,60 @@ +// +// ViewController.swift +// Dynamic Animation Game +// +// Created by Liguo Jiao on 21/11/15. +// Copyright (c) 2015 Liguo Jiao. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + @IBOutlet var backgroundView: UIView! + @IBAction func dropDown(sender: AnyObject) { + drop() + } + @IBOutlet weak var smallBox: UIView! + var dropSize: CGSize { + let size = backgroundView.bounds.size.width / CGFloat(dropRow) + return CGSize(width: size, height: size) + } + var dropRow = 10 + + func drop() { + var frame = CGRect(origin: CGPointZero, size: dropSize) + frame.origin.x = CGFloat.random(dropRow) * dropSize.width + print(frame.origin.x) + let dropView = UIView(frame: frame) + dropView.backgroundColor = UIColor.random + backgroundView.addSubview(dropView) + } + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } +} + +private extension CGFloat { + static func random(max: Int) -> CGFloat { + return CGFloat(arc4random() % UInt32(max)) + } +} + +private extension UIColor { + // TODO: Change to UIImage + class var random: UIColor { + switch arc4random()%5 { + case 0: return UIColor.greenColor() + case 1: return UIColor.grayColor() + case 2: return UIColor.blackColor() + case 3: return UIColor.brownColor() + case 4: return UIColor.redColor() + default: return UIColor.purpleColor() + } + } +} diff --git a/Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift b/Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift new file mode 100644 index 0000000..7f81572 --- /dev/null +++ b/Dynamic Animation GameTests/Dynamic_Animation_GameTests.swift @@ -0,0 +1,36 @@ +// +// Dynamic_Animation_GameTests.swift +// Dynamic Animation GameTests +// +// Created by Liguo Jiao on 21/11/15. +// Copyright (c) 2015 Liguo Jiao. All rights reserved. +// + +import UIKit +import XCTest + +class Dynamic_Animation_GameTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + XCTAssert(true, "Pass") + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock() { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Dynamic Animation GameTests/Info.plist b/Dynamic Animation GameTests/Info.plist new file mode 100644 index 0000000..f590919 --- /dev/null +++ b/Dynamic Animation GameTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + McKay.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + +