Explorar el Código

Add the `add child` instruction

DricomDragon hace 5 años
padre
commit
9e965f8e38
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Main.gd

+ 2 - 0
Main.gd

@@ -24,3 +24,5 @@ func _on_MobTimer_timeout():
 	newMob.orientation = direction
 	newMob.position = $MobPath/MobSpawnLocation.position
 	newMob.linear_velocity = Vector2(rand_range(newMob.min_speed, newMob.max_speed), 0).rotated(direction)
+	
+	add_child(newMob)