Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

fix: stop player from teleporting into tile #121

Merged
merged 4 commits into from
Feb 16, 2024
Merged

Conversation

OlliePugh
Copy link
Collaborator

@OlliePugh OlliePugh force-pushed the olliepugh/fix-bumping branch from 7150236 to 0737e48 Compare February 16, 2024 18:13
@alestiago alestiago self-requested a review February 16, 2024 18:38
Copy link
Owner

@alestiago alestiago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some variables to explicitly detail what the logic tries to tell us.

Feel free to merge if you feel the varibles names are descriptive about the logic. Othwerise, feel free to assign new variable names to them 🙌

parent.priority = parent.position.y.floor();
}

final isMidThrough = parent.position.distanceTo(_targetPosition) <
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is technically not always midthrough, GameSettings.gridDimensions.y/2 was just a nice number that was tied to the game world size, not that bothered about changing the name though

@OlliePugh OlliePugh merged commit 2d71ec6 into main Feb 16, 2024
2 checks passed
@OlliePugh OlliePugh deleted the olliepugh/fix-bumping branch February 16, 2024 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants