Rename MainLoop methods to match Node methods #44593
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently,
MainLoop
has methods_iteration()
and_idle()
._iteration()
is called during_physics_process()
and_idle()
is called during_process()
, in the same wayNode
's_physics_process()
and_process()
are called. Similarly,Engine
'sget_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
'sget_idle_frames()
toget_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 inMain::iteration()
andMainTimerSync
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.