enemy.tscn 959 B

12345678910111213141516171819202122232425262728293031
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://enemy.gd" type="Script" id=1]
  3. [ext_resource path="res://icon.png" type="Texture" id=2]
  4. [sub_resource type="RectangleShape2D" id=1]
  5. extents = Vector2( 32, 32 )
  6. [sub_resource type="RectangleShape2D" id=2]
  7. extents = Vector2( 38, 38 )
  8. [node name="Enemy" type="KinematicBody2D" groups=[
  9. "enemy",
  10. ]]
  11. position = Vector2( 64, 160 )
  12. script = ExtResource( 1 )
  13. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  14. shape = SubResource( 1 )
  15. [node name="Sprite" type="Sprite" parent="."]
  16. modulate = Color( 2, 0.6, 0.5, 1 )
  17. texture = ExtResource( 2 )
  18. [node name="AttackArea" type="Area2D" parent="."]
  19. [node name="CollisionShape2D" type="CollisionShape2D" parent="AttackArea"]
  20. shape = SubResource( 2 )
  21. [connection signal="body_entered" from="AttackArea" to="." method="_on_AttackArea_body_entered"]
  22. [connection signal="body_exited" from="AttackArea" to="." method="_on_AttackArea_body_exited"]