From 35f2e468715e12d93cb88f2258c2d0ae82d1d189 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 6 Aug 2021 09:31:08 +0800 Subject: *collision --- Assets/Scripts/Unit/Controller/UnitController.cs | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'Assets/Scripts/Unit/Controller/UnitController.cs') diff --git a/Assets/Scripts/Unit/Controller/UnitController.cs b/Assets/Scripts/Unit/Controller/UnitController.cs index 031f4697..a9baf595 100644 --- a/Assets/Scripts/Unit/Controller/UnitController.cs +++ b/Assets/Scripts/Unit/Controller/UnitController.cs @@ -2,14 +2,14 @@ using System.Collections.Generic; using UnityEngine; -public interface Interactable -{ - void OnHit(); - void OnHurt(); - void OnGrab(); -} - -public class UnitController : MonoBehaviour, Interactable +//public interface Interactable +//{ +// void OnHit(); +// void OnHurt(); +// void OnGrab(); +//} + +public class UnitController : MonoBehaviour/*, Interactable*/ { // 角色共有的组件 @@ -94,18 +94,19 @@ public class UnitController : MonoBehaviour, Interactable unitRootMotion.OnUpdate(); } - public void OnHit() + public virtual void OnDestroy() + { + } + + public virtual void OnHit() { - throw new System.NotImplementedException(); } - public void OnHurt() + public virtual void OnHurt() { - throw new System.NotImplementedException(); } - public void OnGrab() + public virtual void OnGrab() { - throw new System.NotImplementedException(); } } -- cgit v1.1-26-g67d0