diff options
Diffstat (limited to 'Assets/Scripts/Unit/Component/UnitComponent.cs')
-rw-r--r-- | Assets/Scripts/Unit/Component/UnitComponent.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Assets/Scripts/Unit/Component/UnitComponent.cs b/Assets/Scripts/Unit/Component/UnitComponent.cs new file mode 100644 index 00000000..28f49eda --- /dev/null +++ b/Assets/Scripts/Unit/Component/UnitComponent.cs @@ -0,0 +1,28 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class UnitComponent : MonoBehaviour
+{
+ protected UnitController m_Owner;
+
+ public bool IsAlive
+ {
+ get
+ {
+ return m_Owner != null;
+ }
+ }
+
+ public virtual void Initialize()
+ {
+ m_Owner = GetComponent<UnitController>();
+ }
+
+ public virtual void Release()
+ {
+ m_Owner = null;
+ StopAllCoroutines();
+ }
+
+}
|