mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-21 23:34:18 +00:00
Add spawned
signal to spawner
This commit is contained in:
parent
e80e81b938
commit
8e83184150
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,8 @@ var buffer: int = 0
|
|||
@export_flags_2d_physics var overlapping_bodies_collision_mask: int
|
||||
@export_range(0, 16) var overlapping_body_count_limit: int
|
||||
|
||||
signal spawned(what: RigidBody2D)
|
||||
|
||||
|
||||
func spawn():
|
||||
buffer += 1
|
||||
|
@ -45,6 +47,7 @@ func _do_spawn():
|
|||
scene_instant.position = _select_spawn_position()
|
||||
scene_instant.rotation_degrees = _select_spawn_rotation()
|
||||
add_child(scene_instant)
|
||||
emit_signal("spawned", scene_instant)
|
||||
buffer -= 1
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue