Mob.tscn 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [gd_scene load_steps=10 format=2]
  2. [ext_resource path="res://Mob.cs" type="Script" id=1]
  3. [ext_resource path="res://art/enemySwimming_1.png" type="Texture2D" id=2]
  4. [ext_resource path="res://art/enemySwimming_2.png" type="Texture2D" id=3]
  5. [ext_resource path="res://art/enemyWalking_1.png" type="Texture2D" id=4]
  6. [ext_resource path="res://art/enemyWalking_2.png" type="Texture2D" id=5]
  7. [ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture2D" id=6]
  8. [ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture2D" id=7]
  9. [sub_resource type="SpriteFrames" id=1]
  10. animations = [{
  11. "frames": [ExtResource( 4 ), ExtResource( 5 )],
  12. "loop": true,
  13. "name": "walk",
  14. "speed": 4.0
  15. }, {
  16. "frames": [ExtResource( 6 ), ExtResource( 7 )],
  17. "loop": true,
  18. "name": "fly",
  19. "speed": 3.0
  20. }, {
  21. "frames": [ExtResource( 2 ), ExtResource( 3 )],
  22. "loop": true,
  23. "name": "swim",
  24. "speed": 4.0
  25. }]
  26. [sub_resource type="CapsuleShape2D" id=2]
  27. radius = 35.8898
  28. height = 29.3103
  29. [node name="Mob" type="RigidDynamicBody2D" groups=["mobs"]]
  30. collision_mask = 0
  31. gravity_scale = 0.0
  32. script = ExtResource( 1 )
  33. __meta__ = {
  34. "_edit_group_": true
  35. }
  36. [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
  37. scale = Vector2(0.75, 0.75)
  38. frames = SubResource( 1 )
  39. animation = "walk"
  40. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  41. rotation = 1.5708
  42. shape = SubResource( 2 )
  43. [node name="Visibility" type="VisibleOnScreenNotifier2D" parent="."]
  44. position = Vector2(-0.315128, -9.53674e-07)
  45. scale = Vector2(5.00208, 3.58402)
  46. [connection signal="screen_exited" from="Visibility" to="." method="OnVisibilityScreenExited"]