1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(相机管理): 添加CameraManager类并实现玩家跟随

refactor(物品展示): 修改ItemShow状态机自动隐藏逻辑

feat(游戏逻辑): 添加玩家死亡时的游戏结束界面

style(场景配置): 调整World场景中相机节点位置和偏移

feat(UI): 为ItemShow添加显示动画并更新动画库
This commit is contained in:
2025-08-28 08:15:18 +08:00
parent 857a224f6f
commit 307e3dd63f
7 changed files with 80 additions and 7 deletions
+3 -1
View File
@@ -188,7 +188,9 @@ func tryDie(by: BulletBase):
if MathTool.rate(GameRule.appleDropRate + by.launcher.fields.get(FieldStore.Entity.DROP_APPLE_RATE)) or isBoss:
for i in randi_range(appleCount.x, appleCount.y):
ItemDropped.generate(ItemStore.ItemType.APPLE, 1, position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset))
die()
await die()
if isPlayer() and UIState.player == self:
UIState.setPanel("GameOver")
func tryHeal(count: float):
if inventory[ItemStore.ItemType.APPLE] > 0 and health < fields.get(FieldStore.Entity.MAX_HEALTH):
inventory[ItemStore.ItemType.APPLE] -= 1