From 3c64b5b1b5a92e79766722c46ccf828a5f2007eb Mon Sep 17 00:00:00 2001 From: christides11 Date: Thu, 6 Aug 2020 15:23:49 -0700 Subject: [PATCH] refactor: Removed detect box support. BREAKING CHANGE: Removed detectbox support. Hitboxes can achieve the same effect with no damage/hitstun. --- Assets/CAF/Combat/Attack Events/AttackEventDefinition.cs | 2 -- .../Editor/Combat/Attack/AttackDefinitionEditorWindow.cs | 6 ------ Assets/CAF/Entities/Managers/EntityHitboxManager.cs | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Assets/CAF/Combat/Attack Events/AttackEventDefinition.cs b/Assets/CAF/Combat/Attack Events/AttackEventDefinition.cs index ed1bafb1..728c5d3a 100644 --- a/Assets/CAF/Combat/Attack Events/AttackEventDefinition.cs +++ b/Assets/CAF/Combat/Attack Events/AttackEventDefinition.cs @@ -9,8 +9,6 @@ public class AttackEventDefinition public bool active = true; public bool onHit; public int onHitHitboxGroup; - public bool onDetect; - public int onDetectHitboxGroup; public uint startFrame = 1; public uint endFrame = 1; [SerializeReference] public AttackEvent attackEvent; diff --git a/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs b/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs index 3a7bed7f..1aae94bc 100644 --- a/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs +++ b/Assets/CAF/Editor/Combat/Attack/AttackDefinitionEditorWindow.cs @@ -552,12 +552,6 @@ protected virtual void ShowEventInfo(int eventSelected) attack.events[eventSelected].onHitHitboxGroup = EditorGUILayout.IntField("Hitbox Group", attack.events[eventSelected].onHitHitboxGroup); } - attack.events[eventSelected].onDetect = EditorGUILayout.Toggle("On Detect?", attack.events[eventSelected].onDetect); - if (attack.events[eventSelected].onDetect) - { - attack.events[eventSelected].onDetectHitboxGroup = EditorGUILayout.IntField("Detect Group", - attack.events[eventSelected].onDetectHitboxGroup); - } EditorGUILayout.LabelField(attack.events[eventSelected].attackEvent == null ? "..." : attack.events[eventSelected].attackEvent.GetName()); if (GUILayout.Button("Set Event")) diff --git a/Assets/CAF/Entities/Managers/EntityHitboxManager.cs b/Assets/CAF/Entities/Managers/EntityHitboxManager.cs index 54b66fea..2ccb4679 100644 --- a/Assets/CAF/Entities/Managers/EntityHitboxManager.cs +++ b/Assets/CAF/Entities/Managers/EntityHitboxManager.cs @@ -52,7 +52,7 @@ protected virtual void CleanupAllHitboxes() } /// - /// Checks the hitboxes and detectboxes to see what they hit this frame. + /// Checks the hitboxes to see what they hit this frame. /// This should be called in late update, as physics update right after update. /// public virtual void TickBoxes()