private void OnPlayerEvent(GameEvents.PlayerEvents playerEvent) { if (playerMoveEvents.Count > 0) { foreach (var element in playerMoveEvents) { if (playerEvent == element.EventType) { movement.Move(element.MoveType); break; } } // StartCoroutine(ActivateDetectionBeforeTime(3)); } }