diff options
author | chai <chaifix@163.com> | 2020-11-10 18:47:26 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-11-10 18:47:26 +0800 |
commit | de4941bb799df774f29857ce42a7c139050fa096 (patch) | |
tree | 281a1ac18ffe5682bb2f92eafdbe334b1d7f2632 /Assets/Scripts/Avatar/Avatar_Hurt.cs | |
parent | d21321d1e0d594ab247679cbfde86737aa24979c (diff) |
*hitmanager
Diffstat (limited to 'Assets/Scripts/Avatar/Avatar_Hurt.cs')
-rw-r--r-- | Assets/Scripts/Avatar/Avatar_Hurt.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Assets/Scripts/Avatar/Avatar_Hurt.cs b/Assets/Scripts/Avatar/Avatar_Hurt.cs new file mode 100644 index 00000000..f0cedffa --- /dev/null +++ b/Assets/Scripts/Avatar/Avatar_Hurt.cs @@ -0,0 +1,16 @@ +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);
+ }
+
+ }
+
+}
|