From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- Assets/Scripts/Avatar/Avatar_Hurt.cs | 38 ------------------------------------ 1 file changed, 38 deletions(-) delete mode 100644 Assets/Scripts/Avatar/Avatar_Hurt.cs (limited to 'Assets/Scripts/Avatar/Avatar_Hurt.cs') 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); - } - } - - } - -} -- cgit v1.1-26-g67d0