-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from DreamEmulator/release/0.0.3
Release/0.0.3
- Loading branch information
Showing
49 changed files
with
1,661 additions
and
561 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+204 KB
(190%)
....xcodeproj/project.xcworkspace/xcuserdata/main.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// App.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 24/01/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class App { | ||
static let shared = App() | ||
var game = GameController() | ||
private init() { | ||
game.state.start() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Badge.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 24/01/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import SpriteKit | ||
|
||
struct Badge { | ||
var icon: UIImage | ||
var title: String | ||
var animation: SKScene | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// BondiBall.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 06/02/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
/// The different states the PIP view can be in. | ||
enum BondiBallState { | ||
/// Starting scenario | ||
case initial | ||
/// The Bondi ball view is at rest at the specified endpoint. | ||
case idle(at: CGPoint) | ||
|
||
/// The user is actively moving the Bondi ball view starting from the specified | ||
/// initial position using the specified gesture recognizer. | ||
case interaction(with: UIPanGestureRecognizer, from: CGPoint) | ||
|
||
/// The Bondi ball view is being animated towards the specified endpoint with | ||
/// the specified animator. | ||
case animating(to: CGPoint, using: UIViewPropertyAnimator) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// Sounds.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 11/02/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
enum Sounds: String { | ||
case scoredSound = "scored" | ||
case missedSound = "missed" | ||
case failedSound = "failed" | ||
case touchedSound = "touched" | ||
case releasedSound = "released" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// Collection+Extensions.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 06/02/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
extension Collection where Indices.Iterator.Element == Index { | ||
public subscript(safe index: Index) -> Iterator.Element? { | ||
return (startIndex <= index && index < endIndex) ? self[index] : nil | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// UIColor+Extensions.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 05/02/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
/// Extension for random value get. | ||
extension CGFloat { | ||
static func randomValue() -> CGFloat { | ||
return CGFloat(arc4random()) / CGFloat(UInt32.max) | ||
} | ||
} | ||
/// Extension for random color using random value. | ||
extension UIColor { | ||
static func randomColor() -> UIColor { | ||
return UIColor( | ||
red: .randomValue(), | ||
green: .randomValue(), | ||
blue: .randomValue(), | ||
alpha: 1.0 | ||
) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// UINib+Extensions.swift | ||
// Bondi Ball | ||
// | ||
// Created by Sebastiaan Hols on 06/02/2023. | ||
// Copyright © 2023 Dream Emulator. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
extension UINib { | ||
@propertyWrapper private struct Named { | ||
let wrappedValue: UINib | ||
|
||
init(_ name: String, in bundle: Bundle = .main) { | ||
wrappedValue = UIKit.UINib(nibName: name, bundle: bundle) | ||
} | ||
} | ||
|
||
@Named("Game") static var game | ||
@Named("Score") static var score | ||
|
||
func firstView(owner ownerOrNil: AnyObject?, options optionsOrNil: [UINib.OptionsKey: Any]? = nil) -> UIView? { | ||
instantiate(withOwner: ownerOrNil, options: optionsOrNil)[0] as? UIView | ||
} | ||
} |
Oops, something went wrong.