feat: complete mobile UI implementation

This commit is contained in:
shenlei
2026-09-04 19:54:33 +09:00
parent 9a4a044da5
commit b19d5b5dd3
132 changed files with 6643 additions and 180 deletions
+15 -5
View File
@@ -121,11 +121,21 @@ func _run() -> void:
_ck(picked and fc2.selects == [0], "flow: pick char -> select_character(0)")
fc2.entered_game.emit()
_ck(af.state() == AppFlow.GAME, "flow: entered_game -> GAME")
# 在 GAME 时断线 -> 回 LOGINClientVS22 SetLoginPhase 语义)
# build_game_scene=false skips the real GameScene in this headless state
# machine test; provide its live-scene sentinel so disconnect handling is
# exercised with the same ownership contract as the real client.
af._game = Node.new()
af._game.name = "FakeGameScene"
af.add_child(af._game)
# 在 GAME 时断线 -> 保留 GAME,显示重连遮罩;重连后的角色列表静默选回角色
fc2.disconnected.emit("game dropped")
_ck(af.state() == AppFlow.LOGIN, "flow: disconnect in GAME -> LOGIN")
# 再次收到角色列表时允许回到 SELECT
_ck(af.state() == AppFlow.GAME and af._reconnecting_game,
"flow: disconnect in GAME -> reconnecting GAME")
fc2.char_list.emit([{"index": 0, "name": "Hero", "level": 42}])
_ck(af.state() == AppFlow.SELECT, "flow: back to SELECT")
_ck(fc2.selects == [0, 0], "flow: reconnect re-enters previous character")
fc2.entered_game.emit()
_ck(af.state() == AppFlow.GAME and not af._reconnecting_game,
"flow: reconnect entered_game -> GAME")
fc2.disconnected.emit("dropped")
_ck(af.state() == AppFlow.LOGIN, "flow: disconnect in SELECT -> LOGIN")
_ck(af.state() == AppFlow.GAME and af._reconnecting_game,
"flow: second game disconnect keeps GAME")