summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Avatar/Avatar_Hurt.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Avatar/Avatar_Hurt.cs')
-rw-r--r--Assets/Scripts/Avatar/Avatar_Hurt.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/Assets/Scripts/Avatar/Avatar_Hurt.cs b/Assets/Scripts/Avatar/Avatar_Hurt.cs
deleted file mode 100644
index c6b840b9..00000000
--- a/Assets/Scripts/Avatar/Avatar_Hurt.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public partial class Avatar : MonoBehaviour, IInteractable
-{
- void ApplyHit(HitDefination hit)
- {
- if(hit.hurtAddForce.magnitude != 0)
- {
- m_Body.AddForce(hit.hurtAddForce);
- }
-
- // 切换到受击状态
- switch(hit.type)
- {
- case HitType.Light: m_StateController.SwitchToState(m_StateLightHurt); break;
- case HitType.Midium: m_StateController.SwitchToState(m_StateMidiumHurt); break;
- case HitType.Heavy: m_StateController.SwitchToState(m_StateHeavyHurt); break;
- case HitType.Ground: m_StateController.SwitchToState(m_StateGroundHurt); break;
- case HitType.Air: m_StateController.SwitchToState(m_StateAirHurt); break;
- default:
- m_StateController.SwitchToState(m_StateLightHurt);
- break;
- }
-
- // spark
- if(hit.sparkName != string.Empty)
- {
- if(hit.sparkHostType == HitSparkHost.Center)
- {
- SparksManager.Instance.PlaySpark(hit.sparkName, m_Hips);
- }
- }
-
- }
-
-}