Commit bc93c4f
committed
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.1 parent 57b06bc commit bc93c4f
File tree
3 files changed
+41
-11
lines changed- .github/workflows
- addons/block_code/simple_spawner
3 files changed
+41
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
56 | | - | |
57 | | - | |
| 65 | + | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | | - | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
64 | | - | |
| 73 | + | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
69 | | - | |
| 78 | + | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| |||
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
109 | | - | |
| 118 | + | |
110 | 119 | | |
111 | | - | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| |||
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
169 | 179 | | |
170 | 180 | | |
171 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
172 | 202 | | |
173 | 203 | | |
174 | 204 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments