多轮审查和修复
This commit is contained in:
@@ -18,6 +18,22 @@ namespace BaseGames.Player.States
|
||||
public virtual void OnStateUpdate() { }
|
||||
public virtual void OnStateFixedUpdate() { }
|
||||
public virtual void OnStateExit() { }
|
||||
public virtual PlayerStateBase GetNextState() => null;
|
||||
|
||||
/// <summary>
|
||||
/// 此状态期间是否应视为无敌(忽略伤害)。
|
||||
/// 冲刺等状态 override 为 true,PlayerController.TakeDamage 据此判断是否进入受击。
|
||||
/// </summary>
|
||||
public virtual bool IsInvincible => false;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// 此状态允许转换到的目标类型白名单(仅 Editor 调试用)。
|
||||
/// 返回空列表表示不限制任何转换。子状态按需 override 来声明合法出口。
|
||||
/// </summary>
|
||||
public virtual System.Collections.Generic.IReadOnlyList<System.Type> ValidTransitions
|
||||
=> System.Array.Empty<System.Type>();
|
||||
#endif
|
||||
|
||||
// ── 便捷属性 ──────────────────────────────────────────────────────────
|
||||
protected PlayerController Owner => _owner;
|
||||
|
||||
Reference in New Issue
Block a user