Mob.tscn 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. [gd_scene load_steps=10 format=2]
  2. [ext_resource path="res://Mob.gd" type="Script" id=1]
  3. [ext_resource path="res://art/enemyWalking_1.png" type="Texture" id=2]
  4. [ext_resource path="res://art/enemyWalking_2.png" type="Texture" id=3]
  5. [ext_resource path="res://art/enemyFlyingAlt_1.png" type="Texture" id=4]
  6. [ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture" id=5]
  7. [ext_resource path="res://art/enemySwimming_1.png" type="Texture" id=6]
  8. [ext_resource path="res://art/enemySwimming_2.png" type="Texture" id=7]
  9. [sub_resource type="SpriteFrames" id=1]
  10. animations = [ {
  11. "frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
  12. "loop": true,
  13. "name": "walk",
  14. "speed": 4.0
  15. }, {
  16. "frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
  17. "loop": true,
  18. "name": "fly",
  19. "speed": 3.0
  20. }, {
  21. "frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
  22. "loop": true,
  23. "name": "swim",
  24. "speed": 4.0
  25. } ]
  26. [sub_resource type="CapsuleShape2D" id=2]
  27. custom_solver_bias = 0.0
  28. radius = 34.8222
  29. height = 28.8308
  30. [node name="Mob" type="RigidBody2D"]
  31. input_pickable = true
  32. collision_layer = 1
  33. collision_mask = 0
  34. mode = 0
  35. mass = 1.0
  36. friction = 1.0
  37. bounce = 0.0
  38. gravity_scale = 0.0
  39. custom_integrator = false
  40. continuous_cd = 0
  41. contacts_reported = 0
  42. contact_monitor = false
  43. sleeping = false
  44. can_sleep = true
  45. linear_velocity = Vector2( 0, 0 )
  46. linear_damp = 0.1
  47. angular_velocity = 0.0
  48. angular_damp = 1.0
  49. script = ExtResource( 1 )
  50. _sections_unfolded = [ "Angular", "Collision", "Transform" ]
  51. __meta__ = {
  52. "_edit_group_": true
  53. }
  54. MIN_SPEED = 150
  55. MAX_SPEED = 250
  56. [node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
  57. scale = Vector2( 0.75, 0.75 )
  58. frames = SubResource( 1 )
  59. animation = "swim"
  60. playing = true
  61. _sections_unfolded = [ "Transform" ]
  62. [node name="Collision" type="CollisionShape2D" parent="." index="1"]
  63. rotation = 1.5708
  64. shape = SubResource( 2 )
  65. _sections_unfolded = [ "Transform", "Visibility" ]
  66. [node name="Visibility" type="VisibilityNotifier2D" parent="." index="2"]
  67. rect = Rect2( -10, -10, 20, 20 )