初次提交

This commit is contained in:
2026-07-20 10:56:52 +08:00
commit 7bcc0026e0
462 changed files with 50191 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
## EventID — 全局事件 ID 常量目录(Autoload: EventID
## 权威来源:implementation_plan.md §2.1
## 规则:新增事件从 22 起递增,并同步更新本文件。禁止硬编码整数替代常量。
extends Node
# ── 基础系统事件 (1-4) ────────────────────────────────────────────
const GAME_STARTED: int = 1
const GAME_OVER: int = 2
const GAME_PAUSED: int = 3
const GAME_RESUMED: int = 4
# ── 战斗事件 (5-10) ───────────────────────────────────────────────
const PLAYER_DAMAGED: int = 5
const PLAYER_DIED: int = 6
const ENEMY_KILLED: int = 7
const WAVE_COMPLETE: int = 8
const CHARGE_STATE_CHANGED: int = 9 # 供 UI 使用,非边沿信号
const ON_PLAYER_HURT: int = 10 # 受击反馈(VFX/音效触发)
# ── 法术事件 (11-15) ──────────────────────────────────────────────
const SPELL_CAST_BEGIN: int = 11
const SPELL_CAST_END: int = 12
const DASH_TRIGGERED: int = 13 # 冲刺边沿检测(P6-N36
const CHARGE_FIRED: int = 14 # 蓄力完成一次性边沿(P6-N69);SpellEvaluator 订阅此而非 CHARGE_STATE_CHANGED
const SPELL_EQUIPPED: int = 15
# ── 进度 / UI 事件 (16-21) ────────────────────────────────────────
const LEVEL_UP: int = 16
const SHOP_OPENED: int = 17
const ACHIEVEMENT_UNLOCKED: int = 18 # 负载:{ "achievement_id": String }ST-10 Steam 成就钩子
const BOSS_SPAWNED: int = 19
const GAME_STATE_CHANGED: int = 20 # 负载:{ "from": String, "to": String }
const SPELL_DROP_PICKUP: int = 21 # 负载:{ "spell_id": String, "pos": Vector2 }
# ── S1 新增事件 (22+) ─────────────────────────────────────────────
const APPLY_DAMAGE: int = 22 # 负载:damage_context_id: intEnemyManager 订阅处理伤害
# ── S3 新增事件 (23+) ─────────────────────────────────────────────
const SPELL_DEPTH_EXCEEDED: int = 23 # 负载:{caster_id, depth}HUD 订阅显示警告
const BULLET_HIT_TRIGGER: int = 24 # 负载:{bullet_id, payload_id, hit_pos};调试用
# ── S4 新增事件 (25+) ─────────────────────────────────────────────
const STATUS_APPLIED: int = 25 # 负载:{target_id, status_type, stacks}
const BULLET_HIT: int = 26 # 负载:{bullet_id, target_id, hit_pos}
# ── S5 新增事件 (27+) ─────────────────────────────────────────────
const MINION_SPAWNED: int = 27 # 负载:{minion_id, owner_id, current_count}
const MINION_EXPIRED: int = 28 # 负载:{minion_id, owner_id, current_count}
# 每新增一条须同步更新 implementation_plan.md §2.1 事件目录表