summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Avatar/Hitbox.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-11-09 16:03:45 +0800
committerchai <chaifix@163.com>2020-11-09 16:03:45 +0800
commit0fdb81ffb2af8c39cfd611f485d46f3341206832 (patch)
treedde782dad44038d5d1d997451e5067e7a08b1d3e /Assets/Scripts/Avatar/Hitbox.cs
parent6a1dc10ecae4fa5e45ba19dc8a57b8f3f3199fcb (diff)
* HitManager
Diffstat (limited to 'Assets/Scripts/Avatar/Hitbox.cs')
-rw-r--r--Assets/Scripts/Avatar/Hitbox.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Assets/Scripts/Avatar/Hitbox.cs b/Assets/Scripts/Avatar/Hitbox.cs
new file mode 100644
index 00000000..5fd0cecf
--- /dev/null
+++ b/Assets/Scripts/Avatar/Hitbox.cs
@@ -0,0 +1,33 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Hitbox : MonoBehaviour
+{
+ [SerializeField]
+ private PhysicsBox m_BoxCollider;
+ public PhysicsBox Collider
+ {
+ get
+ {
+ return m_BoxCollider;
+ }
+ }
+
+ [SerializeField]
+ private MonoBehaviour m_Host ;
+
+ public IInteractable Host
+ {
+ get
+ {
+ return m_Host as IInteractable;
+ }
+ }
+
+ private void Awake()
+ {
+ HitManager.Instance.AddHitBox(this);
+ }
+
+}