getDirectionToPlayer method
Gives the direction of the player in relation to this component
Implementation
Direction? getDirectionToPlayer() {
final player = gameRef.player;
if (player == null) {
return null;
}
return getDirectionToTarget(player);
}