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

Rename MainLoop methods to match Node methods #44593

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

madmiraal
Copy link
Contributor

Currently, MainLoop has methods _iteration() and _idle(). _iteration() is called during _physics_process() and _idle() is called during _process(), in the same way Node's _physics_process() and _process() are called. Similarly, Engine's get_idle_frames() refers to the number of process frames.

To make things consistent and avoid confusion, this PR renames:

  • MainLoop's _iteration() to _physics_process()
  • MainLoop's _idle() to _process()
  • Engine's get_idle_frames() to get_process_frames()

Note: This PR includes renaming the internal methods and variables to match the exposed methods. Since these methods are called by Main::iteration(), this PR includes renaming some of the variables used in Main::iteration() and MainTimerSync to make it clearer what is happening in this method and its helper class. Specifically it should help distinguishing between the physics step, the process step, and the combined frame step. Similarly, it includes renaming the groups "idle_process" and "idle_process_internal" to "process" and "process_internal" to match their notification names.

Part of #16863.

@akien-mga akien-mga merged commit e4c0572 into godotengine:master Dec 28, 2020
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants