Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #3

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
### Swift ###
# Xcode
#

.DS_Store
build/
*.pbxuser
!default.pbxuser
Expand Down
Binary file added Assets/Images/button_retry_down.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Images/button_retry_up.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Sks/StarExplosion.sks
Binary file not shown.
Binary file added Assets/Sks/starParticle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Sound/highScore.wav
Binary file not shown.
Binary file added Assets/Sound/touch_mid.wav
Binary file not shown.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<p align="center"><img src="http://share.koofrank.com/IMG_0604.PNG" alt="BFKit Swift Banner"></p>
<p align="center"><img src="http://share.koofrank.com/bg.png"></p>

[![Platform](https://img.shields.io/badge/platform-iOS-000000.svg)](http://cocoadocs.org/docsets)
[![Language](https://img.shields.io/badge/language-Swift-orange.svg)](https://developer.apple.com/swift/)
[![License](https://img.shields.io/badge/license-MIT%20License-lightgrey.svg)](https://github.com/phpmaple/Stick-Hero-Swift/blob/master/LICENSE)

# Stick-Hero-Swift
a universal iOS Game using Swift 2 and iOS SpriteKit.
Currently under active development.
a universal iOS Game using Swift 4 and iOS SpriteKit.

# Requirements

- iOS 8.0+
- Xcode 7.0 Beta
- iOS10
- Swift4
- Xcode9

# License
The MIT License (MIT)
Expand All @@ -22,4 +22,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
59 changes: 56 additions & 3 deletions Stick-Hero.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
objects = {

/* Begin PBXBuildFile section */
730ED6DE1B3BA3DA0041F888 /* touch_mid.wav in Resources */ = {isa = PBXBuildFile; fileRef = 730ED6DD1B3BA3DA0041F888 /* touch_mid.wav */; };
730ED6E01B3BA6FD0041F888 /* Defined.swift in Sources */ = {isa = PBXBuildFile; fileRef = 730ED6DF1B3BA6FD0041F888 /* Defined.swift */; };
731F6F4A1B3D001100B8D89A /* button_retry_up.png in Resources */ = {isa = PBXBuildFile; fileRef = 731F6F481B3D001100B8D89A /* button_retry_up.png */; };
731F6F4C1B3D041600B8D89A /* button_retry_down.png in Resources */ = {isa = PBXBuildFile; fileRef = 731F6F4B1B3D041600B8D89A /* button_retry_down.png */; };
731F6F501B3D095000B8D89A /* starParticle.png in Resources */ = {isa = PBXBuildFile; fileRef = 731F6F4F1B3D095000B8D89A /* starParticle.png */; };
731F6F521B3D0E3B00B8D89A /* StarExplosion.sks in Resources */ = {isa = PBXBuildFile; fileRef = 731F6F511B3D0E3B00B8D89A /* StarExplosion.sks */; };
731F6F581B3D17D000B8D89A /* highScore.wav in Resources */ = {isa = PBXBuildFile; fileRef = 731F6F571B3D17D000B8D89A /* highScore.wav */; };
733263D81B33C592003A3B2F /* bg_country.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 733263D21B33C592003A3B2F /* bg_country.mp3 */; };
733263D91B33C592003A3B2F /* dead.wav in Resources */ = {isa = PBXBuildFile; fileRef = 733263D31B33C592003A3B2F /* dead.wav */; };
733263DA1B33C592003A3B2F /* fall.wav in Resources */ = {isa = PBXBuildFile; fileRef = 733263D41B33C592003A3B2F /* fall.wav */; };
Expand All @@ -26,6 +33,13 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
730ED6DD1B3BA3DA0041F888 /* touch_mid.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = touch_mid.wav; sourceTree = "<group>"; };
730ED6DF1B3BA6FD0041F888 /* Defined.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Defined.swift; sourceTree = "<group>"; };
731F6F481B3D001100B8D89A /* button_retry_up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = button_retry_up.png; sourceTree = "<group>"; };
731F6F4B1B3D041600B8D89A /* button_retry_down.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = button_retry_down.png; sourceTree = "<group>"; };
731F6F4F1B3D095000B8D89A /* starParticle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = starParticle.png; sourceTree = "<group>"; };
731F6F511B3D0E3B00B8D89A /* StarExplosion.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = StarExplosion.sks; sourceTree = "<group>"; };
731F6F571B3D17D000B8D89A /* highScore.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = highScore.wav; sourceTree = "<group>"; };
733263D21B33C592003A3B2F /* bg_country.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = bg_country.mp3; sourceTree = "<group>"; };
733263D31B33C592003A3B2F /* dead.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = dead.wav; sourceTree = "<group>"; };
733263D41B33C592003A3B2F /* fall.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = fall.wav; sourceTree = "<group>"; };
Expand Down Expand Up @@ -68,6 +82,8 @@
733263CE1B33C511003A3B2F /* Images */ = {
isa = PBXGroup;
children = (
731F6F4B1B3D041600B8D89A /* button_retry_down.png */,
731F6F481B3D001100B8D89A /* button_retry_up.png */,
73DBBA9B1B3913D00050C4EF /* stick_background.jpg */,
733263DE1B33C5E9003A3B2F /* human1.png */,
733263DF1B33C5E9003A3B2F /* human2.png */,
Expand All @@ -79,6 +95,8 @@
733263CF1B33C511003A3B2F /* Sks */ = {
isa = PBXGroup;
children = (
731F6F511B3D0E3B00B8D89A /* StarExplosion.sks */,
731F6F4F1B3D095000B8D89A /* starParticle.png */,
);
name = Sks;
path = Assets/Sks;
Expand All @@ -87,6 +105,8 @@
733263D01B33C511003A3B2F /* Sound */ = {
isa = PBXGroup;
children = (
731F6F571B3D17D000B8D89A /* highScore.wav */,
730ED6DD1B3BA3DA0041F888 /* touch_mid.wav */,
733263D21B33C592003A3B2F /* bg_country.mp3 */,
733263D31B33C592003A3B2F /* dead.wav */,
733263D41B33C592003A3B2F /* fall.wav */,
Expand All @@ -103,6 +123,7 @@
children = (
733263E61B33C68D003A3B2F /* StickHeroGameScene.swift */,
73DBBA9D1B39377D0050C4EF /* Tools.swift */,
730ED6DF1B3BA6FD0041F888 /* Defined.swift */,
);
name = Scene;
sourceTree = "<group>";
Expand Down Expand Up @@ -175,11 +196,13 @@
73B7AD4F1B33BEC400115CAD /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = koofrank;
TargetAttributes = {
73B7AD561B33BEC400115CAD = {
CreatedOnToolsVersion = 7.0;
DevelopmentTeam = 2X7R4W3Y3Q;
LastSwiftMigration = 0900;
};
};
};
Expand All @@ -206,9 +229,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
731F6F521B3D0E3B00B8D89A /* StarExplosion.sks in Resources */,
730ED6DE1B3BA3DA0041F888 /* touch_mid.wav in Resources */,
733263DB1B33C592003A3B2F /* kick.wav in Resources */,
733263E11B33C5E9003A3B2F /* human2.png in Resources */,
733263D91B33C592003A3B2F /* dead.wav in Resources */,
731F6F501B3D095000B8D89A /* starParticle.png in Resources */,
733263D81B33C592003A3B2F /* bg_country.mp3 in Resources */,
73DBBA9C1B3913D00050C4EF /* stick_background.jpg in Resources */,
73B7AD691B33BEC400115CAD /* LaunchScreen.storyboard in Resources */,
Expand All @@ -218,6 +244,9 @@
73B7AD661B33BEC400115CAD /* Assets.xcassets in Resources */,
73B7AD641B33BEC400115CAD /* Main.storyboard in Resources */,
733263DD1B33C592003A3B2F /* victory.wav in Resources */,
731F6F581B3D17D000B8D89A /* highScore.wav in Resources */,
731F6F4C1B3D041600B8D89A /* button_retry_down.png in Resources */,
731F6F4A1B3D001100B8D89A /* button_retry_up.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -231,6 +260,7 @@
73B7AD611B33BEC400115CAD /* GameViewController.swift in Sources */,
733263E71B33C68D003A3B2F /* StickHeroGameScene.swift in Sources */,
73B7AD5B1B33BEC400115CAD /* AppDelegate.swift in Sources */,
730ED6E01B3BA6FD0041F888 /* Defined.swift in Sources */,
73DBBA9E1B39377D0050C4EF /* Tools.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -265,13 +295,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -293,7 +331,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -310,13 +348,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -332,9 +378,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -344,21 +391,27 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 2X7R4W3Y3Q;
INFOPLIST_FILE = "Stick-Hero/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "koofrank.ios.Stick-Hero";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
73B7AD851B33BEC400115CAD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 2X7R4W3Y3Q;
INFOPLIST_FILE = "Stick-Hero/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "koofrank.ios.Stick-Hero";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
12 changes: 6 additions & 6 deletions Stick-Hero/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(application: UIApplication) {
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) {
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) {
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) {
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) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

Expand Down
57 changes: 47 additions & 10 deletions Stick-Hero/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,99 @@
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"size" : "40x40",
"filename" : "Icon-Small@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"size" : "40x40",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"size" : "60x60",
"filename" : "Icon-Spotlight-40@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-120.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-180.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"size" : "40x40",
"filename" : "Icon-Small.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"size" : "40x40",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"size" : "76x76",
"filename" : "Icon-Spotlight-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-Spotlight-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76@2x.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Stick-Hero/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}