Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Created February 16, 2018 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsBergqvist/8252c5ca7af36654841d82ca6cb7c3c8 to your computer and use it in GitHub Desktop.
Save LarsBergqvist/8252c5ca7af36654841d82ca6cb7c3c8 to your computer and use it in GitHub Desktop.
Godot: spawning enemies and sending the path to use for positions
extends Node2D
export (PackedScene) var Bat
func _ready():
for i in range(0,10):
var bat = Bat.instance()
bat.path = $BatPath/PathFollow2D
bat.connect("player_hit", self, "on_player_hit")
add_child(bat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment