Forráskód Böngészése

Add the `add child` instruction

DricomDragon 5 éve
szülő
commit
9e965f8e38
1 módosított fájl, 2 hozzáadás és 0 törlés
  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)