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:
@@ -13,7 +13,7 @@ namespace BaseGames.Player
|
||||
{
|
||||
[SerializeField] private PlayerMovementConfigSO _config;
|
||||
|
||||
[Header("墙壁 Layer(默认使用 \"Wall\" + \"Ground\")")]
|
||||
[Header("墙壁 Layer(默认使用 \"Wall\" + \"Platform\")")]
|
||||
[SerializeField] private LayerMask _wallLayer;
|
||||
|
||||
/// <summary>当前是否正在触碰墙壁。</summary>
|
||||
@@ -69,7 +69,7 @@ namespace BaseGames.Player
|
||||
private bool CheckPhysicalContact(int direction)
|
||||
{
|
||||
if (_rb == null) return false;
|
||||
LayerMask mask = _wallLayer != 0 ? _wallLayer : LayerMask.GetMask("Wall", "Ground");
|
||||
LayerMask mask = _wallLayer != 0 ? _wallLayer : LayerMask.GetMask("Wall", "Platform");
|
||||
var filter = new ContactFilter2D();
|
||||
filter.SetLayerMask(mask);
|
||||
filter.useTriggers = false;
|
||||
@@ -94,7 +94,7 @@ namespace BaseGames.Player
|
||||
Vector2 center = transform.position;
|
||||
float len = _config.WallRayLength;
|
||||
float oy = _config.WallRayOffsetY;
|
||||
int layer = _wallLayer != 0 ? (int)_wallLayer : LayerMask.GetMask("Wall", "Ground");
|
||||
int layer = _wallLayer != 0 ? (int)_wallLayer : LayerMask.GetMask("Wall", "Platform");
|
||||
|
||||
bool top = Physics2D.Raycast(center + Vector2.up * oy, dir, len, layer);
|
||||
bool bot = Physics2D.Raycast(center + Vector2.down * oy, dir, len, layer);
|
||||
|
||||
Reference in New Issue
Block a user