Sfoglia il codice sorgente

Add the `add child` instruction

DricomDragon 5 anni fa
parent
commit
9e965f8e38
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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)