-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SimpleSpawner: Rename frequency to period
This property is the time, in seconds, to wait between spawning scenes. This is a period/interval/wavelength, not a frequency, which would be measured in Hz, or 1/seconds. Add a new property and corresponding blocks with the correct definition. Adjust the existing property to delegate to the new property. Use @export_storage to allow its value to be set from existing serialized scenes without it being visible in the inspector. This annotation is new in Godot 4.3 so bump our minimum supported version. When a scene that overrides the old property is loaded in the editor, the value will be propagated to the new property, which is then saved into the scene. Adjusting the new property also adjusts the old property's value. The old property will hang around, harmlessly mirroring the new property, in the .tscn file until it is removed in a text editor. The instances of “frequency” that I have not changed are in the example scene's on-screen documentation. In this case it was actually used correctly: the keyboard action to increase the frequency reduces the property which is now called period, and the decrease action respectively increases the period.
- Loading branch information
Showing
3 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters