Archived on 2026-10-24. The Godot rewrite is cancelled. Migration decisions and work checklists below are withdrawn. Original claims, code examples, file paths, and completion statements have not all been revalidated. Use the current documentation and issue register for maintenance decisions.
UI Flow Analysis¶
Purpose¶
The UI system covers startup splash, main menu navigation, character/stage/shop/achievement/collection/leaderboard views, gameplay HUD, pause/settings, reward cards, and game-over panels.
Current Unity Implementation¶
Main scripts:
| Path | Script | Role |
|---|---|---|
Assets/Script/App/Core/SplashUIController.cs |
SplashUIController |
Startup loading UI and main menu transition. |
Assets/Script/App/UI/Controllers/MenuController.cs |
MenuController |
Generic page stack, back behavior, gate animation. |
Assets/Script/App/UI/Shared/Page.cs |
Page |
Page-level UI behavior. |
Assets/Script/App/Managers/MainMenuManager.cs |
MainMenuManager |
Main menu flow and start-game transition. |
Assets/Script/App/UI/Views/*.cs |
Views | Menu, shop, achievements, collection, leaderboard, joystick views. |
Assets/Script/App/UI/Buttons/*.cs |
Buttons | Stage, shop, collection, leaderboard button data/setup. |
Assets/Script/Game/Managers/GameMenuManager.cs |
GameMenuManager |
Gameplay pause/settings page flow. |
Assets/Script/Game/GameSystem/Rewards/RewardRoller.cs |
RewardRoller |
Reward card/chest animations and card creation. |
Assets/Script/Game/GameSystem/Upgrades/UpgradeSelection.cs |
UpgradeSelection |
Reward card navigation/selection. |
Assets/Script/Game/Managers/GameEndManager.cs |
GameEndManager |
Game-over UI references and buttons. |
Assets/Script/Game/Entities/Player/Presentation/StatusPanel.cs |
StatusPanel |
Per-player HUD stats and resource bars. |
Assets/Script/Game/Stage/DamagePopUp.cs |
DamagePopUp |
Floating damage text. |
Assets/Script/Game/Utilities/Announcer.cs |
Announcer |
Special/miniboss/bonus announcements. |
Key Data¶
MenuControllerpage stack and configured root/back callbacks.GameManagerHUD refs: score text, level text, XP bar, player status panels.SpawnerEventManagerHUD refs: timer bar, boss health, boss icon.RewardRollerreward UI refs:upgradeButton,upgradeButtonBorderParent,upgradeButtonUI, chest displays, particles.UpgradeSelectioncard markers, current selection indices, selection locks.GameEndManagergame-over labels/stats/ability icons/buttons.UIResourcesConfigrarity colors/icons, gradients, damage popup prefab, damaged material.- Localization uses Unity
LocalizedStringand localization tables.
Runtime Flow¶
App Startup and Main Menu¶
AppInitiatorinitializes services and save.SplashUIControllerhandles loading into main menu.- Main menu views/controllers use static managers for data:
AchievementManagerShopManagerCollectionManagerLeaderboardManagerInputManagerMenuControllermanages page transitions and gate animations.- Start-game flow sets
GameSessionand loads stage scene.
Gameplay HUD¶
GameManager.StartUI()hides XP bar, timer bar, and player status panels.OpenGate()starts game and later callsShowUI().ShowUI()tweens timer bar, XP bar, and status panel alpha/position.GameManager.Update()updates level and XP bar.StatusPanel.Update()shows player stats/resources and hides while paused.DamagePopUpanimates damage numbers and returns to pool.
Reward UI¶
RewardRoller.RollTheUpgradeTable()activates reward UI and spawns card buttons.- Chest or card particle animations play.
DisplayAnimation()scales cards in one by one using unscaled time.- Reward phase becomes
Selecting. UpgradeSelectionlets each player navigate and lock a card.ConfirmSelect()applies selected upgrades, destroys buttons, and resumes the game.
Pause / Settings¶
GameMenuManager.InitializeMenu()configuresMenuControllerfor gameplay.- Back button toggles settings if
GameState.CanPause. - Opening settings calls
GameManager.PauseGame(). - Closing root settings sets
GameManager.instance.isPaused = false.
Game Over¶
GameManager.GameOver()hides HUD and activates game-over panel.- It fills end stats, selected ability icons, score/currency/time/kill/level/stage/difficulty/nickname/title.
- It submits leaderboard data and checks achievements.
- It tweens panel into view and enables buttons.
Dependencies¶
- UI is tightly coupled to
GameManager.instance, static managers,Save,GameSession,AudioResources,Game.Audio, DOTween, TextMeshPro, Unity Localization. - Reward UI currently lives mostly inside
RewardRoller, notRewardUIController. UIResourceProviderloadsUIResourcesfromResources.
Problems / Risks¶
- Gameplay UI references are stored on
GameManager. - Reward rolling and reward UI animation are coupled.
UpgradeSelectionchecks both pause state and reward phase; these can diverge.StatusPanelpulls data from player/modifier every frame instead of using signals.- Game-over UI generation is embedded in
GameManager.GameOver(). - Some app views instantiate UI lists directly and may need virtualization if lists grow.
- Localization keys are not centralized in docs yet.
Migration Notes for Godot¶
Preserve:
- Page stack/back behavior.
- Gate transition concept if still desired.
- Gameplay HUD reveal after gate open.
- Reward cards with one/two-player markers and lock-in behavior.
- Game-over stat contents.
- Rarity colors/icons and localized text.
Redesign:
UIRoot
- owns app/gameplay UI layers
PageRouter
- push/pop page stack
HUDController
- observes RunState, ScoreManager, PlayerStats
RewardUIController
- displays cards and emits selections
GameOverView
- consumes a GameOverSummary data object
FeedbackLayer
- damage popups, announcements, screen effects
Do not copy:
- UI references inside core gameplay controllers.
- Reward card animation inside reward roll logic.
- Per-frame UI polling where signal updates are enough.
Open Questions¶
- Which UI screens are needed for the first Godot milestone?
- Whether the current page-stack UX should be preserved exactly.
- Which localization tables should be converted first.
- Unknown / needs manual confirmation.