diff options
Diffstat (limited to 'Assets/Scripts/Avatar/Avatar.cs')
-rw-r--r-- | Assets/Scripts/Avatar/Avatar.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Assets/Scripts/Avatar/Avatar.cs b/Assets/Scripts/Avatar/Avatar.cs index 601fafab..0ee7555f 100644 --- a/Assets/Scripts/Avatar/Avatar.cs +++ b/Assets/Scripts/Avatar/Avatar.cs @@ -16,7 +16,7 @@ public partial class Avatar : MonoBehaviour, IInteractable public Hitbox[] m_Hitbox;
public Hurtbox[] m_Hurtbox;
- protected StateSystem m_StateSystem = new StateSystem();
+ protected StateController m_StateController = new StateController();
// 预定义的state,角色必须定义的
protected StateBase m_StateLightHurt;
@@ -84,13 +84,13 @@ public partial class Avatar : MonoBehaviour, IInteractable public void OnUpdate()
{
- m_StateSystem.OnUpdate();
+ m_StateController.OnUpdate();
}
// 在物理模拟之后调用
public void OnPhysicsUpdate()
{
- m_StateSystem.OnPhysicsUpdate();
+ m_StateController.OnPhysicsUpdate();
}
public virtual Vector3 GetEffectPosition()
@@ -101,13 +101,13 @@ public partial class Avatar : MonoBehaviour, IInteractable // 获得当前击打如果有的话
public Hit GetHit()
{
- return m_StateSystem.GetHit();
+ return m_StateController.GetHit();
}
public virtual void OnHit(HitInfo hitInfo)
{
//Debug.Log("Hit");
- m_StateSystem.OnHit(hitInfo);
+ m_StateController.OnHit(hitInfo);
}
public virtual void OnHurt(HurtInfo hurtInfo)
@@ -116,7 +116,7 @@ public partial class Avatar : MonoBehaviour, IInteractable HitDefination hitDef = hurtInfo.hitDef;
if (hitDef != null)
ApplyHit(hitDef);
- m_StateSystem.OnHurt(hurtInfo);
+ m_StateController.OnHurt(hurtInfo);
}
|