mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 15:44:23 +00:00
Spawner
: Don't spawn anything if no scene is set
This commit is contained in:
parent
c423369de3
commit
91c94d91eb
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,9 @@ func spawn():
|
|||
target = MainGame.get_via_group(self).default_spawn_parent
|
||||
if not target:
|
||||
target = self
|
||||
if not scene:
|
||||
Log.w(self, "Not spawning, no scene is set.")
|
||||
return
|
||||
var entity = scene.instantiate()
|
||||
entity.global_scale = global_scale
|
||||
entity.global_position = global_position
|
||||
|
|
Loading…
Reference in a new issue