Compare commits

...

2 Commits

Author SHA1 Message Date
534de11e5d Refactor ability types and update tags
- Updated AbilityTypeDrawer to replace "Dive" with "DownDash" in the movement abilities section.
- Modified GMToolWindow to reflect the change from "Dive" to "DownDash" in the ability list.
- Changed AbilityType enum to rename "Dive" to "DownDash" with updated description.
- Adjusted AllMovement mask in AbilityType to include "DownDash" instead of "Dive".
- Corrected tag from "OneWayPlatforms" to "OneWayPlatform" in TagManager settings.
2026-05-21 22:37:38 +08:00
2d6a2c5bc2 优化 WallSlideState 切换逻辑,增加对 WallCling 能力的检查以提升角色在墙壁附近的交互体验 2026-05-21 21:16:13 +08:00
9 changed files with 1106 additions and 22 deletions

View File

@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 81da55e0fcf99d34693cbc5a348225c3, type: 3}
m_Name: PLY_PlayerMovementConfig
m_EditorClassIdentifier:
RunSpeed: 10
RunSpeed: 8
AirDragFactor: 1
JumpForce: 24
CoyoteTime: 0.12
@@ -26,18 +26,17 @@ MonoBehaviour:
DashSpeed: 20
DashDuration: 0.25
DashCooldown: 0.4
MaxAerialDashes: 1
DashInvincibilityDuration: 0.2
DashInvincibilityCooldown: 0.9
WallSlideSpeed: 2
WallJumpForceX: 12
WallJumpForceY: 16
WallHangSpeed: 1
WallRayLength: 0.37
WallRayOffsetY: 0.2
WallGrabMaxHeightGain: 0.5
WallGrabReleaseDelay: 0.08
WallJumpBackForceX: 14
WallGrabHeightTolerance: 0.05
WallCoyoteTime: 0.12
WallJumpAwayForceX: 10
WallJumpAwayForceY: 18
WallJumpTowardForceX: -6
WallJumpTowardForceY: 18
WallJumpInputLockDuration: 0.15
DefaultGravityScale: 6

View File

@@ -21,4 +21,4 @@ MonoBehaviour:
SpringKillThreshold: 4
InvincibilityDuration: 0.6
InitialLingZhu: 0
InitialAbilities: 524279
InitialAbilities: 0

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@ namespace BaseGames.Editor
/// 将枚举按能力类别分组,以可读的复选框网格呈现,替代默认的 MaskField。
///
/// 分组:
/// 移动能力 — WallCling / WallJump / Dash / AirDash / DoubleJump / SuperJump / Swim / Dive
/// 移动能力 — WallCling / WallJump / Dash / AirDash / DoubleJump / SuperJump / Swim / DownDash
/// 法术能力 — Spell1 / Spell2 / Spell3
/// 形态能力 — SpiritForm / SpiritDash
/// 战斗能力 — Parry / ChargeAttack / DownSlash
@@ -33,7 +33,7 @@ namespace BaseGames.Editor
(AbilityType.DoubleJump, "二段跳"),
(AbilityType.SuperJump, "超级跳"),
(AbilityType.Swim, "游泳"),
(AbilityType.Dive, "下"),
(AbilityType.DownDash, "下冲刺"),
}),
("法术能力", new[]
{

View File

@@ -47,7 +47,7 @@ namespace BaseGames.Editor
AbilityType.WallCling, AbilityType.WallJump,
AbilityType.Dash, AbilityType.Dash,
AbilityType.DoubleJump, AbilityType.SuperJump,
AbilityType.Swim, AbilityType.Dive,
AbilityType.Swim, AbilityType.DownDash,
}),
("法术能力", new[] { AbilityType.Spell1, AbilityType.Spell2, AbilityType.Spell3 }),
("灵魄形态", new[] { AbilityType.SpiritForm, AbilityType.SpiritDash }),
@@ -458,7 +458,7 @@ namespace BaseGames.Editor
AbilityType.DoubleJump => "二段跳",
AbilityType.SuperJump => "超级跳",
AbilityType.Swim => "游泳",
AbilityType.Dive => "下",
AbilityType.DownDash => "下冲刺",
AbilityType.Spell1 => "法术槽 1",
AbilityType.Spell2 => "法术槽 2",
AbilityType.Spell3 => "法术槽 3",

View File

@@ -19,7 +19,7 @@ namespace BaseGames.Player
DoubleJump = 1u << 4, // 二段跳
SuperJump = 1u << 5, // 超级跳(聚气跳)
Swim = 1u << 6, // 游泳(液体中自由移动)
Dive = 1u << 7, // 下劈(空中下
DownDash = 1u << 7, // 向下冲刺(空中下+冲刺
// ── 法术能力 ──────────────────────────────────────────────────────
Spell1 = 1u << 8, // 法术槽 1策划自定义
@@ -48,7 +48,7 @@ namespace BaseGames.Player
InvincibleDash = 1u << 18,
// ── 组合掩码 ─────────────────────────────────────────────────────────
AllMovement = WallCling | WallJump | Dash | DoubleJump | SuperJump | Swim | Dive | InvincibleDash,
AllMovement = WallCling | WallJump | Dash | DoubleJump | SuperJump | Swim | DownDash | InvincibleDash,
AllSpells = Spell1 | Spell2 | Spell3,
AllSpirit = SpiritForm | SpiritDash,
}

View File

@@ -97,7 +97,8 @@ namespace BaseGames.Player.States
int wallDir = wd.WallDirection;
bool pressingTowardWall = Mathf.Abs(Input.MoveInput.x) > 0.01f
&& (int)Mathf.Sign(Input.MoveInput.x) == wallDir;
if (pressingTowardWall || Owner.IsPostWallJump)
if ((pressingTowardWall || Owner.IsPostWallJump)
&& Stats != null && Stats.HasAbility(AbilityType.WallCling))
{
_owner.TransitionTo(_owner.GetState<WallSlideState>());
return;

View File

@@ -93,7 +93,8 @@ namespace BaseGames.Player.States
int wallDir = wd.WallDirection;
bool pressingTowardWall = Mathf.Abs(Input.MoveInput.x) > 0.01f
&& (int)Mathf.Sign(Input.MoveInput.x) == wallDir;
if (pressingTowardWall || Owner.IsPostWallJump)
if ((pressingTowardWall || Owner.IsPostWallJump)
&& Stats != null && Stats.HasAbility(AbilityType.WallCling))
{
_owner.TransitionTo(_owner.GetState<WallSlideState>());
return;

View File

@@ -16,7 +16,7 @@ TagManager:
- Platform
- Player
- Volume
- OneWayPlatforms
- OneWayPlatform
- EnemyProjectile
- Enemy
- PlayerHitBox