Refactor event channels and update layer specifications
- Removed StatusEffectEventChannelSO and its associated meta file. - Updated CreateEventChannelAssets to handle new shield-related events. - Added CharmModule for managing charm assets in the DataHub. - Introduced CharmEventChannelSO for charm equipped/unequipped events. - Changed layer references from "Ground" to "Platform" in various scripts. - Updated documentation to reflect changes in layer specifications. - Created new event assets for ShieldBroken, ShieldRestored, StatusEffectApplied, and StatusEffectExpired.
This commit is contained in:
@@ -34,23 +34,23 @@
|
||||
| `Player` | 玩家根节点 GameObject | 玩家物理碰撞体(含 Rigidbody2D);地面检测、存档点、检查点触发器通过此 Layer 筛选玩家 |
|
||||
| `PlayerHurtBox` | 玩家子节点 `HurtBox` | 接收伤害的碰撞体(isTrigger);`EnemyHitBox` / `EnemyProjectile` 命中此 Layer 时对玩家造成伤害 |
|
||||
| `PlayerHitBox` | 玩家武器 / 技能 HitBox | 发出伤害的碰撞体;命中 `EnemyHurtBox` 时触发对敌人的伤害判定 |
|
||||
| `PlayerProjectile` | 玩家发射的投射物 | 玩家子弹;不与 `PlayerHurtBox`、`EnemyProjectile` 碰撞,命中 `EnemyHurtBox` 或 `Ground` 时有效 |
|
||||
| `PlayerProjectile` | 玩家发射的投射物 | 玩家子弹;不与 `PlayerHurtBox`、`EnemyProjectile` 碰撞,命中 `EnemyHurtBox` 或 `Platform` 时有效 |
|
||||
|
||||
### 2.2 敌人相关
|
||||
|
||||
| Layer 名称 | 挂载对象 | 用途说明 |
|
||||
|---|---|---|
|
||||
| `Enemy` | 敌人根节点 GameObject | 敌人物理碰撞体(含 Rigidbody2D);与 `Ground` 碰撞实现站立 |
|
||||
| `Enemy` | 敌人根节点 GameObject | 敌人物理碰撞体(含 Rigidbody2D);与 `Platform` 碰撞实现站立 |
|
||||
| `EnemyHurtBox` | 敌人子节点 `HurtBox` | 接收伤害的碰撞体(isTrigger);`PlayerHitBox` / `PlayerProjectile` 命中此 Layer 时对敌人造成伤害;`EnemyHitBox` 也可命中此 Layer(敌人互伤,HitBox 运行时排除自身根节点) |
|
||||
| `EnemyHitBox` | 敌人武器 HitBox / `LethalTrap` 主体 | 发出伤害的碰撞体;命中 `PlayerHurtBox` 时触发对玩家的伤害判定 |
|
||||
| `EnemyProjectile` | 敌人发射的投射物 | 敌人子弹;不与 `EnemyHurtBox` 碰撞,命中 `PlayerHurtBox` 或 `Ground` 时有效 |
|
||||
| `EnemyProjectile` | 敌人发射的投射物 | 敌人子弹;不与 `EnemyHurtBox` 碰撞,命中 `PlayerHurtBox` 或 `Platform` 时有效 |
|
||||
|
||||
### 2.3 地形相关
|
||||
|
||||
| Layer 名称 | 挂载对象 | 用途说明 |
|
||||
|---|---|---|
|
||||
| `Ground` | 静态地面、移动平台、Tilemap 地形、障碍物 | 玩家与敌人站立的实体地面;`PlayerMovement` 的 `_groundLayer`、`PlayerWallDetector` 的 `_wallLayer`(默认)均包含此 Layer;投射物命中后销毁 |
|
||||
| `Wall` | 墙壁碰撞体(垂直面) | 玩家攀墙检测(`PlayerWallDetector` 默认掩码包含 `Wall` 和 `Ground`);若地形使用统一的 Tilemap 则墙壁可合并到 `Ground` Layer |
|
||||
| `Platform` | 静态地面、移动平台、Tilemap 地形、障碍物 | 玩家与敌人站立的实体平台;`PlayerMovement` 的 `_groundLayer`、`PlayerWallDetector` 的 `_wallLayer`(默认)均包含此 Layer;投射物命中后销毁 |
|
||||
| `Wall` | 墙壁碰撞体(垂直面) | 玩家攀墙检测(`PlayerWallDetector` 默认掩码包含 `Wall` 和 `Platform`);若地形使用统一的 Tilemap 则墙壁可合并到 `Platform` Layer |
|
||||
|
||||
### 2.4 触发区域
|
||||
|
||||
@@ -81,14 +81,14 @@
|
||||
| `PlayerHitBox` | `EnemyHurtBox` | ✅ | 玩家攻击伤害敌人 |
|
||||
| `EnemyHitBox` | `PlayerHurtBox` | ✅ | 敌人攻击伤害玩家 |
|
||||
| `EnemyHitBox` | `EnemyHurtBox` | ✅ | 敌人可互相伤害(HitBox 运行时排除自身根节点) |
|
||||
| `Player` | `Ground` | ✅ | 玩家站在地面上 |
|
||||
| `Enemy` | `Ground` | ✅ | 敌人站在地面上 |
|
||||
| `Player` | `Platform` | ✅ | 玩家站在平台上 |
|
||||
| `Enemy` | `Platform` | ✅ | 敌人站在平台上 |
|
||||
| `PlayerProjectile` | `EnemyHurtBox` | ✅ | 玩家投射物伤害敌人 |
|
||||
| `PlayerProjectile` | `PlayerHurtBox` | ❌ | 玩家投射物不自伤 |
|
||||
| `PlayerProjectile` | `Ground` | ✅ | 玩家投射物命中地形 |
|
||||
| `PlayerProjectile` | `Platform` | ✅ | 玩家投射物命中地形 |
|
||||
| `EnemyProjectile` | `PlayerHurtBox` | ✅ | 敌人投射物伤害玩家 |
|
||||
| `EnemyProjectile` | `EnemyHurtBox` | ❌ | 敌人投射物不自伤 |
|
||||
| `EnemyProjectile` | `Ground` | ✅ | 敌人投射物命中地形 |
|
||||
| `EnemyProjectile` | `Platform` | ✅ | 敌人投射物命中地形 |
|
||||
| `PlayerHitBox` | `PlayerHurtBox` | ❌ | 玩家不自伤 |
|
||||
| `PlayerProjectile` | `EnemyProjectile` | ❌ | 子弹不互相碰撞(Clash 系统单独处理) |
|
||||
| `HazardHitBox` | `PlayerHurtBox` | ✅ | 环境危险伤害玩家 |
|
||||
|
||||
Reference in New Issue
Block a user