summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Avatar/Avatar_Hurt.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-11-10 18:47:26 +0800
committerchai <chaifix@163.com>2020-11-10 18:47:26 +0800
commitde4941bb799df774f29857ce42a7c139050fa096 (patch)
tree281a1ac18ffe5682bb2f92eafdbe334b1d7f2632 /Assets/Scripts/Avatar/Avatar_Hurt.cs
parentd21321d1e0d594ab247679cbfde86737aa24979c (diff)
*hitmanager
Diffstat (limited to 'Assets/Scripts/Avatar/Avatar_Hurt.cs')
-rw-r--r--Assets/Scripts/Avatar/Avatar_Hurt.cs16
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);
+ }
+
+ }
+
+}