Enemy.tscn 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [gd_scene load_steps=11 format=2]
  2. [ext_resource path="res://Enemy.gd" type="Script" id=1]
  3. [ext_resource path="res://dodge_assets/art/enemySwimming_1.png" type="Texture" id=2]
  4. [ext_resource path="res://dodge_assets/art/enemySwimming_2.png" type="Texture" id=3]
  5. [ext_resource path="res://dodge_assets/art/enemyFlyingAlt_1.png" type="Texture" id=4]
  6. [ext_resource path="res://dodge_assets/art/enemyFlyingAlt_2.png" type="Texture" id=5]
  7. [ext_resource path="res://dodge_assets/art/enemyWalking_1.png" type="Texture" id=6]
  8. [ext_resource path="res://dodge_assets/art/enemyWalking_2.png" type="Texture" id=7]
  9. [sub_resource type="PhysicsMaterial" id=3]
  10. friction = 0.1
  11. bounce = 1.0
  12. [sub_resource type="SpriteFrames" id=1]
  13. animations = [ {
  14. "frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
  15. "loop": true,
  16. "name": "swim",
  17. "speed": 4.0
  18. }, {
  19. "frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
  20. "loop": true,
  21. "name": "fly",
  22. "speed": 3.0
  23. }, {
  24. "frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
  25. "loop": true,
  26. "name": "walk",
  27. "speed": 5.0
  28. } ]
  29. [sub_resource type="CapsuleShape2D" id=2]
  30. radius = 24.0469
  31. height = 52.8654
  32. [node name="Enemy" type="RigidBody2D"]
  33. physics_material_override = SubResource( 3 )
  34. gravity_scale = 0.0
  35. script = ExtResource( 1 )
  36. __meta__ = {
  37. "_edit_group_": true
  38. }
  39. [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
  40. scale = Vector2( 0.75, 0.75 )
  41. frames = SubResource( 1 )
  42. animation = "walk"
  43. [node name="HitBox" type="CollisionShape2D" parent="."]
  44. rotation = 1.5708
  45. shape = SubResource( 2 )
  46. [node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
  47. [connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]