Explorar o código

Add the `add child` instruction

DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
9e965f8e38
Modificáronse 1 ficheiros con 2 adicións e 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)