Skip to content

Commit f11fca1

Browse files
committed
refactored some code + bug fixes
1 parent 43a2a53 commit f11fca1

File tree

7 files changed

+124
-156
lines changed

7 files changed

+124
-156
lines changed
0 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import Foundation
2+
import SpriteKit
3+
4+
//delays animations
5+
public func delay(_ delay:Double, closure:@escaping ()->()) {
6+
let when = DispatchTime.now() + delay
7+
DispatchQueue.main.asyncAfter(deadline: when, execute: closure)
8+
}
9+
10+
//bitmask declarations
11+
struct PhysicsCategory {
12+
static let None : UInt32 = 0
13+
static let Bullet : UInt32 = 0b1 // 1
14+
static let Ship : UInt32 = 0b10 // 2
15+
static let Note : UInt32 = 0b100 // 3
16+
}
17+
18+
struct NoteLength {
19+
static let quarter : Double = 0.25
20+
static let half : Double = 0.25
21+
//add more later?
22+
}
23+
24+

WWDC 2018 Debug Xcode Project/WWDC SUBMISSION 2018.playground/Sources/Extensions.swift

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)