Files
spellforge/scripts/autoloads/event_ids.gd
T

54 lines
3.7 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 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}
# ── S6 Boss 事件 (29+) ────────────────────────────────────────────
const BOSS_PHASE_CHANGED: int = 29 # 负载:{boss_id, boss_type, phase}
const BOSS_KILLED: int = 30 # 负载:{boss_id, boss_type, wave}
# 每新增一条须同步更新 implementation_plan.md §2.1 事件目录表