Skip to content

Commit

Permalink
Swift 1.2 fixes
Browse files Browse the repository at this point in the history
Thanks to @jblocksom
  • Loading branch information
Aaron authored and Aaron committed Apr 11, 2015
1 parent a110705 commit 00ef1fc
Show file tree
Hide file tree
Showing 56 changed files with 25 additions and 21 deletions.
Empty file modified Orbit 7.xcodeproj/project.pbxproj 100644 → 100755
Empty file.
Empty file modified Orbit 7.xcodeproj/project.xcworkspace/contents.xcworkspacedata 100644 → 100755
Empty file.
Empty file.
Binary file not shown.
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
<true/>
<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
<true/>
</dict>
</plist>
Empty file.
Empty file.
Empty file.
Empty file modified Orbit 7/AppDelegate.swift 100644 → 100755
Empty file.
Empty file modified Orbit 7/Base.lproj/LaunchScreen.xib 100644 → 100755
Empty file.
Empty file modified Orbit 7/Base.lproj/Main.storyboard 100644 → 100755
Empty file.
Empty file modified Orbit 7/GameOver.swift 100644 → 100755
Empty file.
Empty file modified Orbit 7/GameScene.sks 100644 → 100755
Empty file.
13 changes: 6 additions & 7 deletions Orbit 7/GameScene.swift 100644 → 100755
Expand Up @@ -108,14 +108,14 @@ class GameScene: SKScene {
}

}



// Adding Touches
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {


let location = touches.anyObject()?.locationInNode(self)
var node = self.nodeAtPoint(location!)
let location = (touches.first as? UITouch)?.locationInNode(self)
let node = self.nodeAtPoint(location!)

// Particles
func explosion() {
Expand Down Expand Up @@ -208,10 +208,9 @@ class GameScene: SKScene {

}


override func touchesEnded(touches: NSSet, withEvent event: UIEvent) {
override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) {
let dropDown = SKAction.scaleTo(1.0, duration: 0.2)

}


}
6 changes: 3 additions & 3 deletions Orbit 7/GameViewController.swift 100644 → 100755
Expand Up @@ -11,12 +11,12 @@ import SpriteKit

extension SKNode {
class func unarchiveFromFile(file : NSString) -> SKNode? {
if let path = NSBundle.mainBundle().pathForResource(file, ofType: "sks") {
if let path = NSBundle.mainBundle().pathForResource(file as String, ofType: "sks") {
var sceneData = NSData(contentsOfFile: path, options: .DataReadingMappedIfSafe, error: nil)!
var archiver = NSKeyedUnarchiver(forReadingWithData: sceneData)

archiver.setClass(self.classForKeyedUnarchiver(), forClassName: "SKScene")
let scene = archiver.decodeObjectForKey(NSKeyedArchiveRootObjectKey) as Menu
let scene = archiver.decodeObjectForKey(NSKeyedArchiveRootObjectKey) as! Menu
archiver.finishDecoding()
return scene
} else {
Expand All @@ -33,7 +33,7 @@ class GameViewController: UIViewController {

if let scene = Menu.unarchiveFromFile("GameScene") as? Menu {
// Configure the view.
let skView = self.view as SKView
let skView = self.view as! SKView
skView.showsFPS = false
skView.showsNodeCount = false

Expand Down
Empty file modified Orbit 7/Images.xcassets/AppIcon.appiconset/Contents.json 100644 → 100755
Empty file.
Empty file modified Orbit 7/Images.xcassets/AppIcon.appiconset/icon.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/Images.xcassets/AppIcon.appiconset/icon@2x.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/Info.plist 100644 → 100755
Empty file.
9 changes: 5 additions & 4 deletions Orbit 7/Menu.swift 100644 → 100755
Expand Up @@ -133,13 +133,14 @@ class Menu: SKScene {


// Game Levels
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
let location = touches.anyObject()?.locationInNode(self)
var node = self.nodeAtPoint(location!)
audioPlayer.stop()
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {

let touchLocation = (touches.first as? UITouch)?.locationInNode(self)
let node = self.nodeAtPoint(touchLocation!)

audioPlayer.stop()


if node.name == "Sun" {

runAction(SKAction.sequence([
Expand Down
Empty file modified Orbit 7/Shapes.swift 100644 → 100755
Empty file.
Empty file modified Orbit 7/Spiraling.wav 100644 → 100755
Empty file.
Empty file modified Orbit 7/Stars.sks 100644 → 100755
Empty file.
Empty file modified Orbit 7/asteroid2.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blackAsteroidL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blackAsteroidM.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blackAsteroidS.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blueAsteroidL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blueAsteroidM.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blueAsteroidS.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/blueDot@2x.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/greenAsteroidL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/greenAsteroidM.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/greenAsteroidS.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/greenDot.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/greenDot@2x.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/menuTest.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/purpleAsteroidL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/purpleAsteroidM.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/purpleAsteroidS.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/purpleDot@2x.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/redAsteroidL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/redAsteroidM.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/redAsteroidS.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/redDot@2x.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/satelliteL.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Orbit 7/satelliteM.png 100644 → 100755
Empty file modified Orbit 7/satelliteS.png 100644 → 100755
Empty file modified Orbit 7/sunDot.png 100644 → 100755
Empty file modified Orbit 7/sunDot@2x.png 100644 → 100755
Empty file modified Orbit 7/zapzap.wav 100644 → 100755
Empty file.
Empty file modified Orbit 7Tests/Info.plist 100644 → 100755
Empty file.
Empty file modified Orbit 7Tests/Orbit_7Tests.swift 100644 → 100755
Empty file.
Empty file modified ParticleFire.sks 100644 → 100755
Empty file.
8 changes: 1 addition & 7 deletions README.md 100644 → 100755
@@ -1,10 +1,4 @@
# Orbit7
Open Source iOS Game created in SpriteKit with Swift
<center>
![alt tag](https://www.mav3r1ck.com/content/images/2015/03/iTunesArtwork-2x-4.png)
</center>
<br>
<center>
https://itunes.apple.com/us/app/orbit-7/id959313456 </center>


![alt tag](http://s29.postimg.org/n9l6zppd1/Shapes.gif)
Empty file modified spark.png 100644 → 100755

0 comments on commit 00ef1fc

Please sign in to comment.