|
|
@@ -88,8 +88,8 @@ public class SoulBoom : MonoBehaviour
|
|
|
}
|
|
|
private void OnTriggerEnter(Collider other)
|
|
|
{
|
|
|
- if (!isTransfiguration && (other.gameObject.layer == 6 || other.gameObject.layer == 7)
|
|
|
- && other.name == "BodyCollider")
|
|
|
+ BeHitTrigger beHitTrigger = other.GetComponent<BeHitTrigger>();
|
|
|
+ if (!isTransfiguration && beHitTrigger != null && (other.gameObject.layer == 6 || other.gameObject.layer == 7))
|
|
|
{
|
|
|
MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
|
|
|
if (character.rb == null)
|
|
|
@@ -103,8 +103,7 @@ public class SoulBoom : MonoBehaviour
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (isTransfiguration && other.gameObject.layer == 8
|
|
|
- && other.name == "BodyCollider")
|
|
|
+ if (isTransfiguration && beHitTrigger != null && other.gameObject.layer == 8)
|
|
|
{
|
|
|
MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
|
|
|
if (!characters.Exists(t => t == character))
|
|
|
@@ -116,8 +115,8 @@ public class SoulBoom : MonoBehaviour
|
|
|
}
|
|
|
private void OnTriggerExit(Collider other)
|
|
|
{
|
|
|
- if (!isTransfiguration && (other.gameObject.layer == 6 || other.gameObject.layer == 7)
|
|
|
- && other.name == "BodyCollider")
|
|
|
+ BeHitTrigger beHitTrigger = other.GetComponent<BeHitTrigger>();
|
|
|
+ if (!isTransfiguration && beHitTrigger != null && (other.gameObject.layer == 6 || other.gameObject.layer == 7))
|
|
|
{
|
|
|
MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
|
|
|
if (characters.Exists(t => t == character))
|
|
|
@@ -125,8 +124,7 @@ public class SoulBoom : MonoBehaviour
|
|
|
characters.Remove(character);
|
|
|
}
|
|
|
}
|
|
|
- if (isTransfiguration && other.gameObject.layer == 8
|
|
|
- && other.name == "BodyCollider")
|
|
|
+ if (isTransfiguration && beHitTrigger != null && other.gameObject.layer == 8)
|
|
|
{
|
|
|
MoveCharacter character = other.GetComponentInParent<MoveCharacter>();
|
|
|
if (characters.Exists(t => t == character))
|