placeholder.gd 441 B

123456789101112131415161718192021
  1. extends KinematicBody2D
  2. func damage(arg, id):
  3. vida += arg
  4. get_tree().get_nodes_in_group('server')[0]._enemy_dmg(enemy_id)
  5. if vida <= 0:
  6. get_tree().get_nodes_in_group('enemy_authority')[0].death_count(id)
  7. queue_free()
  8. var enemy_id = 0
  9. var type = 0
  10. var fliph = 0
  11. export var vida = 2
  12. # Called when the node enters the scene tree for the first time.
  13. var motion = Vector2(0,50)
  14. func _physics_process(delta):
  15. move_and_slide(motion)