We need to keep the variable outside of the function. I'm not even sure there is a practical reason for it to be inside of the function.
1 month ago | 1
it should be even faster when you actually define what type the enemy variable is, i know it's set to implicitly type the variable, which is way better than just leaving it untyped, but explicitly typing it (should) make it a bit faster still
1 month ago
| 1
my guess id the one where the var Enemy :=… is outside the function, so you dont have to set that variable 10000 times
1 month ago
| 1
Hey, I added and preload my spawning nodes to my singleton, is it better than preload on each scene?
1 month ago | 0
Game Dev for Noobs
You spawn many enemies. Which is faster?
1 month ago | [YT] | 29