# Build a lobby and battle preparation screen with Game Agent

Follow the Zhao Yun and A Dou learning project from a Cocos Creator lobby into battle preparation. Inspect the stamina deduction, prefabs and verification scene.

Canonical page: https://gameagent.ink/en/docs/zhaoyun-lobby/
Updated: 2026-11-25

Zhao Yun and A Dou is a Cocos Creator 3.8.8 learning project with a lobby, dialogs and a board preparation screen. Watch the [publisher’s demonstration](https://www.bilibili.com/video/BV1TGep6AEj6/) and find the matching scenes in the [project README for this revision](https://github.com/qq865738120/zhaoyun_adou/blob/634f93f03ab9860ab828e1a4a09875b76772bbc1/README.md). This version covers entering preparation. Automatic battle and the complete combat loop belong to a later stage.

## Start in the business scene

Import the directory containing `package.json` in Cocos Dashboard and open `assets/scenes/Game.scene`. Check that the Inspector fields `testScenario` and `testResourcePath` are empty before starting Preview. The design resolution is 640 × 1386 with fit-to-width enabled. Inspect the lobby and its dialogs, then enter the preparation screen.

## Trace the stamina deduction

The game validates BattlePage before deducting 5 stamina and creating an active run. The [stage 03 handover](https://github.com/qq865738120/zhaoyun_adou/blob/634f93f03ab9860ab828e1a4a09875b76772bbc1/docs/%E6%8A%80%E6%9C%AF%E5%AE%9E%E6%96%BD%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%8E%A5%E8%AE%B0%E5%BD%95/%E9%98%B6%E6%AE%B503-%E4%BA%A4%E6%8E%A5.md) records that order. With a test save, record stamina before and after entry and check that one action opens the screen and charges once. Try the ordinary recruit, deploy and merge operations against the handover. Long-press and special cancellation gestures still need testing. For an editable prefab in your own project, see the [UI workflow example](https://gameagent.ink/en/docs/workflows/).

## Check evidence and asset rights

Open `assets/scenes/Verification.scene` and select **Run checks** for the separate logic suite. All 58 logic checks passed in the development preview, as recorded in the [stage 02 handover](https://github.com/qq865738120/zhaoyun_adou/blob/634f93f03ab9860ab828e1a4a09875b76772bbc1/docs/%E6%8A%80%E6%9C%AF%E5%AE%9E%E6%96%BD%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%8E%A5%E8%AE%B0%E5%BD%95/%E9%98%B6%E6%AE%B502-%E4%BA%A4%E6%8E%A5.md). Platform builds, physical devices and audio listening checks require separate verification. The repository includes third-party commercial game imagery and audio for study and grants no commercial rights to those assets. Use appropriately licensed replacements when shipping your own game.

## Sources

- [Project README and asset terms](https://github.com/qq865738120/zhaoyun_adou/blob/634f93f03ab9860ab828e1a4a09875b76772bbc1/README.md)
- [Stage handover and verification record](https://github.com/qq865738120/zhaoyun_adou/blob/634f93f03ab9860ab828e1a4a09875b76772bbc1/docs/%E6%8A%80%E6%9C%AF%E5%AE%9E%E6%96%BD%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%8E%A5%E8%AE%B0%E5%BD%95/%E9%98%B6%E6%AE%B503-%E4%BA%A4%E6%8E%A5.md)
- [Stage 02 development preview and its 58 logic checks](https://github.com/qq865738120/zhaoyun_adou/blob/634f93f03ab9860ab828e1a4a09875b76772bbc1/docs/%E6%8A%80%E6%9C%AF%E5%AE%9E%E6%96%BD%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%8E%A5%E8%AE%B0%E5%BD%95/%E9%98%B6%E6%AE%B502-%E4%BA%A4%E6%8E%A5.md)
- [Original Bilibili demonstration (Chinese)](https://www.bilibili.com/video/BV1TGep6AEj6/)
