Skip to content

Commit

Permalink
Remove old stupid hack
Browse files Browse the repository at this point in the history
  • Loading branch information
damikdk committed Aug 2, 2022
1 parent 13e4022 commit 3880892
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Simple arcade. Control two nice balls, catch all of bad ones
- `SceneRendererDelegate` hack without `UIKit` for `renderer(renderer, updateAtTime)` (`SceneKit` each-frame-callback similar to `update()` from Unity)
- `SCNPhysicsContactDelegate` hack without `UIKit`
- In-game `Timer` hack
- `GCVirtualController`, each stick moves one ball. Simpliest implementation, check `DarkGame` for cool cross-platform `SuperController` code
- `GCVirtualController`, each stick moves one ball. Simpliest implementation, check `DarkGame` for cool cross-platform `SuperController` code (WIP)

<p float="left">
<img src="https://i.imgur.com/XEwC2ZD.png" alt="TogetherGame" height="300">
Expand All @@ -57,7 +57,7 @@ Simple arcade. Control ball, loot and run. The Spirit will light your way

- `SceneRendererDelegate` hack without `UIKit` for `renderer(renderer, updateAtTime)` (`SceneKit` each-frame-callback similar to `update()` from Unity)
- `SCNPhysicsContactDelegate` hack without `UIKit`
- Keyboard, real gamepad or `GCVirtualController` control in one place called `SuperController` (WIP)
- Keyboard, real gamepad or `GCVirtualController` control in one place called `SuperController` (WIP, not working)

<p float="left">
<img src="https://i.imgur.com/lRe8b1h.png" alt="DarkGame" height="400">
Expand All @@ -74,5 +74,4 @@ Current tasks are [here](https://github.com/damikdk/SwiftUI-Games/projects/1)
- Simple dialog system

## Broken things (by Apple or me)
- Safe Area Insets. And some in-game Taps because of it
- Some transitions and animations
2 changes: 2 additions & 0 deletions Shared/Games/TBS/TBSGame.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ extension TBSGame {
} else {
currentTeam = teams.first
}

highlight(team: currentTeam)
} else {
print("Strange, there is no current team. Or it's not in TeamManager array: \(currentTeam?.id ?? "<NIL>")")
currentTeam = teams.first
Expand Down
6 changes: 0 additions & 6 deletions Shared/UI/Menu/MenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ struct MenuView: View {
@State private var currentGame: Game?

var body: some View {
// Hack since iOS 14 can't update State
// (https://developer.apple.com/forums/thread/652080)
Text(currentGame?.name ?? "")
.frame(width: 0, height: 0)
.hidden()

// ZStack it is just a bad workaround for GCVirtualController.
// Earlier I used `fullScreenCover`, but GCVirtualController appears BELOW it.
// So keep GCVirtualController in View, not Overlay/Modal/Sheet containers
Expand Down

0 comments on commit 3880892

Please sign in to comment.