diff --git a/HappyCrab/HappyCrab.xcodeproj/project.pbxproj b/HappyCrab/HappyCrab.xcodeproj/project.pbxproj new file mode 100644 index 00000000..bdfe618b --- /dev/null +++ b/HappyCrab/HappyCrab.xcodeproj/project.pbxproj @@ -0,0 +1,393 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 3C740F1224525CFB006FBE32 /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C740F1124525CFB006FBE32 /* GameViewController.swift */; }; + 3C740F1424525D20006FBE32 /* InfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C740F1324525D20006FBE32 /* InfoViewController.swift */; }; + 3C740F1624525D39006FBE32 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C740F1524525D39006FBE32 /* SettingsViewController.swift */; }; + 3C740F18245266A1006FBE32 /* custom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C740F17245266A1006FBE32 /* custom.swift */; }; + 3CC72A04244E85B300E68622 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC72A03244E85B300E68622 /* AppDelegate.swift */; }; + 3CC72A06244E85B300E68622 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC72A05244E85B300E68622 /* SceneDelegate.swift */; }; + 3CC72A0B244E85B300E68622 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3CC72A09244E85B300E68622 /* Main.storyboard */; }; + 3CC72A0D244E85B400E68622 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3CC72A0C244E85B400E68622 /* Assets.xcassets */; }; + 3CC72A10244E85B400E68622 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3CC72A0E244E85B400E68622 /* LaunchScreen.storyboard */; }; + 3CC72A18244E879E00E68622 /* Crab.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3CC72A17244E879E00E68622 /* Crab.xcassets */; }; + 3CC72A1A244E87B000E68622 /* SKSpriteNode+Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC72A19244E87B000E68622 /* SKSpriteNode+Utility.swift */; }; + 3CC72A1C244E87E800E68622 /* info.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3CC72A1B244E87E800E68622 /* info.storyboard */; }; + 3CC72A21244E883A00E68622 /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC72A20244E883A00E68622 /* Settings.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 3C740F1124525CFB006FBE32 /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = ""; }; + 3C740F1324525D20006FBE32 /* InfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoViewController.swift; sourceTree = ""; }; + 3C740F1524525D39006FBE32 /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = ""; }; + 3C740F17245266A1006FBE32 /* custom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = custom.swift; sourceTree = ""; }; + 3CC72A00244E85B300E68622 /* HappyCrab.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HappyCrab.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3CC72A03244E85B300E68622 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 3CC72A05244E85B300E68622 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 3CC72A0A244E85B300E68622 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 3CC72A0C244E85B400E68622 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3CC72A0F244E85B400E68622 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 3CC72A11244E85B400E68622 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3CC72A17244E879E00E68622 /* Crab.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Crab.xcassets; path = ../../Crab.xcassets; sourceTree = ""; }; + 3CC72A19244E87B000E68622 /* SKSpriteNode+Utility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "SKSpriteNode+Utility.swift"; path = "../../SKSpriteNode+Utility.swift"; sourceTree = ""; }; + 3CC72A1B244E87E800E68622 /* info.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = info.storyboard; sourceTree = ""; }; + 3CC72A20244E883A00E68622 /* Settings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3CC729FD244E85B300E68622 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3CC729F7244E85B200E68622 = { + isa = PBXGroup; + children = ( + 3CC72A02244E85B300E68622 /* HappyCrab */, + 3CC72A01244E85B300E68622 /* Products */, + ); + sourceTree = ""; + }; + 3CC72A01244E85B300E68622 /* Products */ = { + isa = PBXGroup; + children = ( + 3CC72A00244E85B300E68622 /* HappyCrab.app */, + ); + name = Products; + sourceTree = ""; + }; + 3CC72A02244E85B300E68622 /* HappyCrab */ = { + isa = PBXGroup; + children = ( + 3CC72A1F244E881900E68622 /* ViewControllers */, + 3CC72A1E244E880A00E68622 /* Views */, + 3CC72A1D244E87FD00E68622 /* Models */, + 3CC72A19244E87B000E68622 /* SKSpriteNode+Utility.swift */, + 3CC72A17244E879E00E68622 /* Crab.xcassets */, + 3CC72A03244E85B300E68622 /* AppDelegate.swift */, + 3CC72A05244E85B300E68622 /* SceneDelegate.swift */, + 3CC72A09244E85B300E68622 /* Main.storyboard */, + 3CC72A0C244E85B400E68622 /* Assets.xcassets */, + 3CC72A0E244E85B400E68622 /* LaunchScreen.storyboard */, + 3CC72A11244E85B400E68622 /* Info.plist */, + 3CC72A1B244E87E800E68622 /* info.storyboard */, + 3C740F1124525CFB006FBE32 /* GameViewController.swift */, + 3C740F1324525D20006FBE32 /* InfoViewController.swift */, + 3C740F1524525D39006FBE32 /* SettingsViewController.swift */, + 3C740F17245266A1006FBE32 /* custom.swift */, + ); + path = HappyCrab; + sourceTree = ""; + }; + 3CC72A1D244E87FD00E68622 /* Models */ = { + isa = PBXGroup; + children = ( + 3CC72A20244E883A00E68622 /* Settings.swift */, + ); + path = Models; + sourceTree = ""; + }; + 3CC72A1E244E880A00E68622 /* Views */ = { + isa = PBXGroup; + children = ( + ); + path = Views; + sourceTree = ""; + }; + 3CC72A1F244E881900E68622 /* ViewControllers */ = { + isa = PBXGroup; + children = ( + ); + path = ViewControllers; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3CC729FF244E85B300E68622 /* HappyCrab */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3CC72A14244E85B400E68622 /* Build configuration list for PBXNativeTarget "HappyCrab" */; + buildPhases = ( + 3CC729FC244E85B300E68622 /* Sources */, + 3CC729FD244E85B300E68622 /* Frameworks */, + 3CC729FE244E85B300E68622 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HappyCrab; + productName = HappyCrab; + productReference = 3CC72A00244E85B300E68622 /* HappyCrab.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3CC729F8244E85B200E68622 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1120; + LastUpgradeCheck = 1120; + ORGANIZATIONNAME = "Ian French"; + TargetAttributes = { + 3CC729FF244E85B300E68622 = { + CreatedOnToolsVersion = 11.2; + }; + }; + }; + buildConfigurationList = 3CC729FB244E85B200E68622 /* Build configuration list for PBXProject "HappyCrab" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3CC729F7244E85B200E68622; + productRefGroup = 3CC72A01244E85B300E68622 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3CC729FF244E85B300E68622 /* HappyCrab */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3CC729FE244E85B300E68622 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3CC72A10244E85B400E68622 /* LaunchScreen.storyboard in Resources */, + 3CC72A18244E879E00E68622 /* Crab.xcassets in Resources */, + 3CC72A1C244E87E800E68622 /* info.storyboard in Resources */, + 3CC72A0D244E85B400E68622 /* Assets.xcassets in Resources */, + 3CC72A0B244E85B300E68622 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3CC729FC244E85B300E68622 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C740F1224525CFB006FBE32 /* GameViewController.swift in Sources */, + 3CC72A1A244E87B000E68622 /* SKSpriteNode+Utility.swift in Sources */, + 3C740F18245266A1006FBE32 /* custom.swift in Sources */, + 3C740F1624525D39006FBE32 /* SettingsViewController.swift in Sources */, + 3CC72A04244E85B300E68622 /* AppDelegate.swift in Sources */, + 3CC72A21244E883A00E68622 /* Settings.swift in Sources */, + 3C740F1424525D20006FBE32 /* InfoViewController.swift in Sources */, + 3CC72A06244E85B300E68622 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 3CC72A09244E85B300E68622 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3CC72A0A244E85B300E68622 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 3CC72A0E244E85B400E68622 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3CC72A0F244E85B400E68622 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3CC72A12244E85B400E68622 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + 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 = 13.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 3CC72A13244E85B400E68622 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 13.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3CC72A15244E85B400E68622 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HappyCrab/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "Cygnus-Enterprises.HappyCrab"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3CC72A16244E85B400E68622 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = HappyCrab/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "Cygnus-Enterprises.HappyCrab"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3CC729FB244E85B200E68622 /* Build configuration list for PBXProject "HappyCrab" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3CC72A12244E85B400E68622 /* Debug */, + 3CC72A13244E85B400E68622 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3CC72A14244E85B400E68622 /* Build configuration list for PBXNativeTarget "HappyCrab" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3CC72A15244E85B400E68622 /* Debug */, + 3CC72A16244E85B400E68622 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3CC729F8244E85B200E68622 /* Project object */; +} diff --git a/HappyCrab/HappyCrab.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/HappyCrab/HappyCrab.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..037308b9 --- /dev/null +++ b/HappyCrab/HappyCrab.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/HappyCrab/HappyCrab.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/HappyCrab/HappyCrab.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/HappyCrab/HappyCrab.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/HappyCrab/HappyCrab/AppDelegate.swift b/HappyCrab/HappyCrab/AppDelegate.swift new file mode 100644 index 00000000..c6ac57eb --- /dev/null +++ b/HappyCrab/HappyCrab/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// HappyCrab +// +// Created by Ian French on 4/20/20. +// Copyright © 2020 Ian French. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/HappyCrab/HappyCrab/Assets.xcassets/AppIcon.appiconset/Contents.json b/HappyCrab/HappyCrab/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/HappyCrab/HappyCrab/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "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" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/HappyCrab/HappyCrab/Assets.xcassets/Contents.json b/HappyCrab/HappyCrab/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/HappyCrab/HappyCrab/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/Contents.json b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/Contents.json new file mode 100644 index 00000000..de1a7900 --- /dev/null +++ b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "game_controller.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "game_controller@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "game_controller@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller.png b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller.png new file mode 100644 index 00000000..df0891d5 Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller@2x.png b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller@2x.png new file mode 100644 index 00000000..336e170d Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller@2x.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller@3x.png b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller@3x.png new file mode 100644 index 00000000..3b8ac924 Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/game_controller.imageset/game_controller@3x.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/Contents.json b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/Contents.json new file mode 100644 index 00000000..c7d3dae4 --- /dev/null +++ b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "info.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "info@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "info@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info.png b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info.png new file mode 100644 index 00000000..64c0cb1e Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info@2x.png b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info@2x.png new file mode 100644 index 00000000..c623f0b9 Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info@2x.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info@3x.png b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info@3x.png new file mode 100644 index 00000000..1bf21719 Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/info.imageset/info@3x.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/Contents.json b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/Contents.json new file mode 100644 index 00000000..a683f09c --- /dev/null +++ b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "settings.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "settings@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "settings@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings.png b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings.png new file mode 100644 index 00000000..8f712b18 Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings@2x.png b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings@2x.png new file mode 100644 index 00000000..5ed4658a Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings@2x.png differ diff --git a/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings@3x.png b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings@3x.png new file mode 100644 index 00000000..674bea76 Binary files /dev/null and b/HappyCrab/HappyCrab/Assets.xcassets/settings.imageset/settings@3x.png differ diff --git a/HappyCrab/HappyCrab/Base.lproj/LaunchScreen.storyboard b/HappyCrab/HappyCrab/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/HappyCrab/HappyCrab/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HappyCrab/HappyCrab/Base.lproj/Main.storyboard b/HappyCrab/HappyCrab/Base.lproj/Main.storyboard new file mode 100644 index 00000000..daeee571 --- /dev/null +++ b/HappyCrab/HappyCrab/Base.lproj/Main.storyboard @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HappyCrab/HappyCrab/GameViewController.swift b/HappyCrab/HappyCrab/GameViewController.swift new file mode 100644 index 00000000..33aeec08 --- /dev/null +++ b/HappyCrab/HappyCrab/GameViewController.swift @@ -0,0 +1,28 @@ +// +// GameViewController.swift +// HappyCrab +// +// Created by Ian French on 4/23/20. +// Copyright © 2020 Ian French. All rights reserved. +// + + +import UIKit +import SpriteKit + +class GameViewController: UIViewController { + + + @IBOutlet weak var skview: SKView! + + + var skscene: CustomScene? = nil + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + skscene = CustomScene(size: view.bounds.size) + skview.presentScene(skscene) + + } +} + diff --git a/HappyCrab/HappyCrab/Info.plist b/HappyCrab/HappyCrab/Info.plist new file mode 100644 index 00000000..b5f9c079 --- /dev/null +++ b/HappyCrab/HappyCrab/Info.plist @@ -0,0 +1,62 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/HappyCrab/HappyCrab/InfoViewController.swift b/HappyCrab/HappyCrab/InfoViewController.swift new file mode 100644 index 00000000..d5516ebd --- /dev/null +++ b/HappyCrab/HappyCrab/InfoViewController.swift @@ -0,0 +1,18 @@ +// +// InfoViewController.swift +// HappyCrab +// +// Created by Ian French on 4/22/20. +// Copyright © 2020 Ian French. All rights reserved. +// + + +import UIKit + + +class InfoViewController: UIViewController { + + @IBAction func done(_ sender: Any) { + navigationController?.popToRootViewController(animated: true) + } +} diff --git a/HappyCrab/HappyCrab/Models/Settings.swift b/HappyCrab/HappyCrab/Models/Settings.swift new file mode 100644 index 00000000..79c8d15c --- /dev/null +++ b/HappyCrab/HappyCrab/Models/Settings.swift @@ -0,0 +1,17 @@ +// +// Settings.swift +// HappyCrab +// +// Created by Ian French on 4/20/20. +// Copyright © 2020 Ian French. All rights reserved. +// + +import Foundation + +class Settings { + static let shared = Settings() + private init() {} + + var shouldRoll = false + var shouldZoom = false +} diff --git a/HappyCrab/HappyCrab/SceneDelegate.swift b/HappyCrab/HappyCrab/SceneDelegate.swift new file mode 100644 index 00000000..1ee26032 --- /dev/null +++ b/HappyCrab/HappyCrab/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// HappyCrab +// +// Created by Ian French on 4/20/20. +// Copyright © 2020 Ian French. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/HappyCrab/HappyCrab/SettingsViewController.swift b/HappyCrab/HappyCrab/SettingsViewController.swift new file mode 100644 index 00000000..3deb57ff --- /dev/null +++ b/HappyCrab/HappyCrab/SettingsViewController.swift @@ -0,0 +1,25 @@ +// +// SettingsViewController.swift +// HappyCrab +// +// Created by Ian French on 4/22/20. +// Copyright © 2020 Ian French. All rights reserved. +// + +import UIKit + + +class SettingsViewController: UIViewController { + + + @IBAction func toggleRoll(_ sender: UISwitch) { + if sender.isOn == true { + } + } + + + @IBAction func toggleZoom(_ sender: UISwitch) { + if sender.isOn == true { + } + } +} diff --git a/HappyCrab/HappyCrab/custom.swift b/HappyCrab/HappyCrab/custom.swift new file mode 100644 index 00000000..3b3aba1b --- /dev/null +++ b/HappyCrab/HappyCrab/custom.swift @@ -0,0 +1,52 @@ +// +// custom.swift +// HappyCrab +// +// Created by Ian French on 4/22/20. +// Copyright © 2020 Ian French. All rights reserved. +// + +import SpriteKit + + +class CustomScene: SKScene { + let crab = SKSpriteNode() + + // Add and center child, initializing animation sequence + override func sceneDidLoad() { + super.sceneDidLoad() + addChild(crab) + crab.loadTextures(named: "HappyCrab", forKey: SKSpriteNode.textureKey) + crab.position = CGPoint(x: frame.midX, y: frame.midY) + } + + // Move to touch + public override func touchesBegan(_ touches: Set, with event: UIEvent?) { + + // Fetch a touch or leave + guard !touches.isEmpty, let touch = touches.first else { return } + + // Retrieve position + let position = touch.location(in: self) + + // Create move action + let actionDuration = 1.0 + let moveAction = SKAction.move(to: position, duration: actionDuration) + + let rollAction = SKAction.rotate(byAngle: CGFloat.pi * 2, duration: actionDuration) + let zoomAction = SKAction.scale(by: 1.3, duration: 0.3) + let unzoomAction = SKAction.scale(to: 1.0, duration: 0.1) + + switch Settings.shared.shouldZoom { + case false: + crab.run(moveAction) + case true: + let sequenceAction = SKAction.sequence([zoomAction, moveAction, unzoomAction]) + crab.run(sequenceAction) + } + + if Settings.shared.shouldRoll { + crab.run(rollAction) + } + } +} diff --git a/HappyCrab/HappyCrab/info.storyboard b/HappyCrab/HappyCrab/info.storyboard new file mode 100644 index 00000000..7552a323 --- /dev/null +++ b/HappyCrab/HappyCrab/info.storyboard @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +