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