From 3880892a37d5a1436319c496934dfedc7357ccf1 Mon Sep 17 00:00:00 2001 From: Damir Minnegalimov Date: Tue, 2 Aug 2022 14:32:34 +0300 Subject: [PATCH] Remove old stupid hack --- README.md | 5 ++--- Shared/Games/TBS/TBSGame.swift | 2 ++ Shared/UI/Menu/MenuView.swift | 6 ------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b6b7d52..6c2e807 100644 --- a/README.md +++ b/README.md @@ -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)

TogetherGame @@ -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)

DarkGame @@ -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 diff --git a/Shared/Games/TBS/TBSGame.swift b/Shared/Games/TBS/TBSGame.swift index 1be9b28..32070b1 100644 --- a/Shared/Games/TBS/TBSGame.swift +++ b/Shared/Games/TBS/TBSGame.swift @@ -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 ?? "")") currentTeam = teams.first diff --git a/Shared/UI/Menu/MenuView.swift b/Shared/UI/Menu/MenuView.swift index d4276e9..bc015fe 100644 --- a/Shared/UI/Menu/MenuView.swift +++ b/Shared/UI/Menu/MenuView.swift @@ -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