diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f8ab190 Binary files /dev/null and b/.DS_Store differ diff --git a/Sprites Project/Sprites Project.xcodeproj/project.pbxproj b/Sprites Project/Sprites Project.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e8bc0db --- /dev/null +++ b/Sprites Project/Sprites Project.xcodeproj/project.pbxproj @@ -0,0 +1,343 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + F3A38A3A219B6A8B0065D5A9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A38A39219B6A8B0065D5A9 /* AppDelegate.swift */; }; + F3A38A3C219B6A8B0065D5A9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A38A3B219B6A8B0065D5A9 /* ViewController.swift */; }; + F3A38A3F219B6A8B0065D5A9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3A38A3D219B6A8B0065D5A9 /* Main.storyboard */; }; + F3A38A41219B6A8C0065D5A9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3A38A40219B6A8C0065D5A9 /* Assets.xcassets */; }; + F3A38A44219B6A8C0065D5A9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3A38A42219B6A8C0065D5A9 /* LaunchScreen.storyboard */; }; + F3A38A4C219B6CEA0065D5A9 /* CustomScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A38A4B219B6CEA0065D5A9 /* CustomScene.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + F3A38A36219B6A8B0065D5A9 /* Sprites Project.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sprites Project.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + F3A38A39219B6A8B0065D5A9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + F3A38A3B219B6A8B0065D5A9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + F3A38A3E219B6A8B0065D5A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + F3A38A40219B6A8C0065D5A9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + F3A38A43219B6A8C0065D5A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + F3A38A45219B6A8C0065D5A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F3A38A4B219B6CEA0065D5A9 /* CustomScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomScene.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + F3A38A33219B6A8B0065D5A9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + F3A38A2D219B6A8B0065D5A9 = { + isa = PBXGroup; + children = ( + F3A38A38219B6A8B0065D5A9 /* Sprites Project */, + F3A38A37219B6A8B0065D5A9 /* Products */, + ); + sourceTree = ""; + }; + F3A38A37219B6A8B0065D5A9 /* Products */ = { + isa = PBXGroup; + children = ( + F3A38A36219B6A8B0065D5A9 /* Sprites Project.app */, + ); + name = Products; + sourceTree = ""; + }; + F3A38A38219B6A8B0065D5A9 /* Sprites Project */ = { + isa = PBXGroup; + children = ( + F3A38A39219B6A8B0065D5A9 /* AppDelegate.swift */, + F3A38A3B219B6A8B0065D5A9 /* ViewController.swift */, + F3A38A4B219B6CEA0065D5A9 /* CustomScene.swift */, + F3A38A3D219B6A8B0065D5A9 /* Main.storyboard */, + F3A38A40219B6A8C0065D5A9 /* Assets.xcassets */, + F3A38A42219B6A8C0065D5A9 /* LaunchScreen.storyboard */, + F3A38A45219B6A8C0065D5A9 /* Info.plist */, + ); + path = "Sprites Project"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + F3A38A35219B6A8B0065D5A9 /* Sprites Project */ = { + isa = PBXNativeTarget; + buildConfigurationList = F3A38A48219B6A8C0065D5A9 /* Build configuration list for PBXNativeTarget "Sprites Project" */; + buildPhases = ( + F3A38A32219B6A8B0065D5A9 /* Sources */, + F3A38A33219B6A8B0065D5A9 /* Frameworks */, + F3A38A34219B6A8B0065D5A9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Sprites Project"; + productName = "Sprites Project"; + productReference = F3A38A36219B6A8B0065D5A9 /* Sprites Project.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + F3A38A2E219B6A8B0065D5A9 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Meera Andersen"; + TargetAttributes = { + F3A38A35219B6A8B0065D5A9 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = F3A38A31219B6A8B0065D5A9 /* Build configuration list for PBXProject "Sprites Project" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = F3A38A2D219B6A8B0065D5A9; + productRefGroup = F3A38A37219B6A8B0065D5A9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F3A38A35219B6A8B0065D5A9 /* Sprites Project */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + F3A38A34219B6A8B0065D5A9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F3A38A44219B6A8C0065D5A9 /* LaunchScreen.storyboard in Resources */, + F3A38A41219B6A8C0065D5A9 /* Assets.xcassets in Resources */, + F3A38A3F219B6A8B0065D5A9 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + F3A38A32219B6A8B0065D5A9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F3A38A3C219B6A8B0065D5A9 /* ViewController.swift in Sources */, + F3A38A3A219B6A8B0065D5A9 /* AppDelegate.swift in Sources */, + F3A38A4C219B6CEA0065D5A9 /* CustomScene.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + F3A38A3D219B6A8B0065D5A9 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F3A38A3E219B6A8B0065D5A9 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + F3A38A42219B6A8C0065D5A9 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F3A38A43219B6A8C0065D5A9 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + F3A38A46219B6A8C0065D5A9 /* 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = 12.1; + 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; + }; + F3A38A47219B6A8C0065D5A9 /* 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; + CODE_SIGN_IDENTITY = "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 = 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 = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + F3A38A49219B6A8C0065D5A9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = "Sprites Project/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.meeraandersen.Sprites-Project"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + F3A38A4A219B6A8C0065D5A9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = "Sprites Project/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.meeraandersen.Sprites-Project"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + F3A38A31219B6A8B0065D5A9 /* Build configuration list for PBXProject "Sprites Project" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F3A38A46219B6A8C0065D5A9 /* Debug */, + F3A38A47219B6A8C0065D5A9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F3A38A48219B6A8C0065D5A9 /* Build configuration list for PBXNativeTarget "Sprites Project" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F3A38A49219B6A8C0065D5A9 /* Debug */, + F3A38A4A219B6A8C0065D5A9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = F3A38A2E219B6A8B0065D5A9 /* Project object */; +} diff --git a/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a6c8931 --- /dev/null +++ b/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/xcuserdata/meeraandersen.xcuserdatad/UserInterfaceState.xcuserstate b/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/xcuserdata/meeraandersen.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..74cf78f Binary files /dev/null and b/Sprites Project/Sprites Project.xcodeproj/project.xcworkspace/xcuserdata/meeraandersen.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Sprites Project/Sprites Project.xcodeproj/xcuserdata/meeraandersen.xcuserdatad/xcschemes/xcschememanagement.plist b/Sprites Project/Sprites Project.xcodeproj/xcuserdata/meeraandersen.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..3eea0cc --- /dev/null +++ b/Sprites Project/Sprites Project.xcodeproj/xcuserdata/meeraandersen.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Sprites Project.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Sprites Project/Sprites Project/AppDelegate.swift b/Sprites Project/Sprites Project/AppDelegate.swift new file mode 100644 index 0000000..d6854af --- /dev/null +++ b/Sprites Project/Sprites Project/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Sprites Project +// +// Created by Meera Andersen on 11/13/18. +// Copyright © 2018 Meera Andersen. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> 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 invalidate graphics rendering callbacks. 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 active 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:. + } + + +} + diff --git a/Sprites Project/Sprites Project/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sprites Project/Sprites Project/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Sprites Project/Sprites Project/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/Sprites Project/Sprites Project/Assets.xcassets/Contents.json b/Sprites Project/Sprites Project/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Sprites Project/Sprites Project/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Sprites Project/Sprites Project/Base.lproj/LaunchScreen.storyboard b/Sprites Project/Sprites Project/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/Sprites Project/Sprites Project/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites Project/Sprites Project/Base.lproj/Main.storyboard b/Sprites Project/Sprites Project/Base.lproj/Main.storyboard new file mode 100644 index 0000000..3f0a1b9 --- /dev/null +++ b/Sprites Project/Sprites Project/Base.lproj/Main.storyboard @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sprites Project/Sprites Project/CustomScene.swift b/Sprites Project/Sprites Project/CustomScene.swift new file mode 100644 index 0000000..44622d3 --- /dev/null +++ b/Sprites Project/Sprites Project/CustomScene.swift @@ -0,0 +1,42 @@ +import UIKit +import SpriteKit + +class CustomScene: SKScene { + + public override func touchesBegan(_ touches: Set, with event: UIEvent?) { + guard !touches.isEmpty, let touch = touches.first + else { return } + + + let node = SKShapeNode(circleOfRadius: 8) + node.fillColor = randomColor() + node.position = CGPoint(x: frame.midX, y: frame.midY) + let position = touch.location(in: self) + let actionDuration = 0.5 + let moveAction = SKAction.move(to: position, duration: actionDuration) + node.run(moveAction) + + + + addChild(node) + + + + let zoomAction = SKAction.scale(by: 1.3, duration: 0.5) + let unzoomAction = SKAction.scale(to: 1.0, duration: 0.3) + let sequenceAction = SKAction.sequence([zoomAction, unzoomAction]) + node.run(sequenceAction) + + + + } + + func randomColor() -> UIColor { + let red = CGFloat.random(in: 0.0 ... 1.0) + let green = CGFloat.random(in: 0.0 ... 1.0) + let blue = CGFloat.random(in: 0.0 ... 1.0) + + return UIColor(red: red, green: green, blue: blue, alpha: 1.0) + } +} + diff --git a/Sprites Project/Sprites Project/Info.plist b/Sprites Project/Sprites Project/Info.plist new file mode 100644 index 0000000..89d7858 --- /dev/null +++ b/Sprites Project/Sprites Project/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Sprites Project/Sprites Project/ViewController.swift b/Sprites Project/Sprites Project/ViewController.swift new file mode 100644 index 0000000..c757297 --- /dev/null +++ b/Sprites Project/Sprites Project/ViewController.swift @@ -0,0 +1,16 @@ +import UIKit +import SpriteKit + +class ViewController: UIViewController { + @IBOutlet var skview: SKView! + + var skscene: CustomScene? = nil + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + skscene = CustomScene(size: view.bounds.size) + skview.presentScene(skscene) + } +} + +