Ground Movement Fix

This commit is contained in:
Syntriax 2022-11-15 14:30:08 +03:00
parent 062fe203ad
commit 8d1f4d5f96
1 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,11 @@ namespace Syntriax.Modules.Movement.Implementations
rigid = GetComponent<Rigidbody2D>(); rigid = GetComponent<Rigidbody2D>();
groundTrigger = GetComponentInChildren<IGroundTrigger>(); groundTrigger = GetComponentInChildren<IGroundTrigger>();
if (groundTrigger != null)
groundTrigger.OnTriggered += OnGroundTrigger; groundTrigger.OnTriggered += OnGroundTrigger;
else
CanTakeOver = true;
} }
private void OnGroundTrigger(bool isGrounded) private void OnGroundTrigger(bool isGrounded)