Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more Kotlin-y and also work with durations. #152

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

RefuX
Copy link
Contributor

@RefuX RefuX commented Aug 29, 2024

I was going though my code and removing System timing functions and using the kotlin.time functions instead.
Though it would be nice for Fleks to support the kotlin.time.Duration value type.

@Quillraven
Copy link
Owner

I don't have a problem with that but please add a test to verify that it behaves the same as the float version.

Also, I think delta time in LibGDX is in milliseconds but you use nanoseconds here? Maybe Kotlin has a built in extension function for the conversion that you are doing?

Anyway, I want to release a new version by end of this week. We can add this feature to the release, if everything is ready.

@Quillraven Quillraven added the enhancement New feature or request label Aug 30, 2024
@Quillraven Quillraven added this to the 2.9 milestone Aug 30, 2024
@RefuX
Copy link
Contributor Author

RefuX commented Aug 30, 2024

Never used LibGDX, but I'll take your word for it :)

Updated as requested, let me know if you need anything else, don't want to miss the release train. Choo! Choo! 🚂

@Quillraven Quillraven merged commit c370093 into Quillraven:master Aug 30, 2024
4 checks passed
@Quillraven
Copy link
Owner

@RefuX: I just checked and the delta time in LibGDX is actually in seconds. It is the time between last and current frame in seconds. I will adjust it in the master later and update the documentation of the methods to make it clearer.

@Quillraven
Copy link
Owner

Quillraven commented Aug 30, 2024

@RefuX : I just pushed the change. Please let me know if this is still fine for you.

edit: I broke something. Need to have a look tomorrow, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants