diff options
author | chai <chaifix@163.com> | 2020-11-16 14:38:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-11-16 14:38:55 +0800 |
commit | ac2b469bd76d7d91d10894184cbddad0796ce7bc (patch) | |
tree | cd17f7c3820d1ecd8dd5919292784a819d9c925e /Assets/Scripts/Avatar/Avatar.cs | |
parent | 6a9c951e2ccbf768c87ed4226565a7117c8e2747 (diff) |
*statecontroller
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);
}
|