enemiessprite.gd 612 B

1234567891011121314151617181920212223
  1. extends Node
  2. var sprite = preload('res://enemie/monster.tscn')
  3. func _ready():
  4. for i in 1024:
  5. var add= sprite.instance()
  6. add.texture = get_node('../../Textures').dict['Goblin1']
  7. add.z_index = 1
  8. add_child(add)
  9. add= sprite.instance()
  10. add.texture = get_node('../../Textures').dict['Goblin2']
  11. add.z_index = 2
  12. add_child(add)
  13. add= sprite.instance()
  14. add.texture = get_node('../../Textures').dict['Goblin3']
  15. add.z_index = 3
  16. add_child(add)
  17. add= sprite.instance()
  18. add.texture = get_node('../../Textures').dict['Goblin4']
  19. add.z_index = 4
  20. add_child(add)
  21. pass # Replace with function body.