Mob.tscn 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/enemyFlyingAlt_1.png" type="Texture" id=2]
  4. [ext_resource path="res://art/enemyFlyingAlt_2.png" type="Texture" id=3]
  5. [ext_resource path="res://art/enemyWalking_1.png" type="Texture" id=4]
  6. [ext_resource path="res://art/enemyWalking_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": "fly",
  14. "speed": 3.0
  15. }, {
  16. "frames": [ ExtResource( 6 ), ExtResource( 7 ) ],
  17. "loop": true,
  18. "name": "swim",
  19. "speed": 4.0
  20. }, {
  21. "frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
  22. "loop": true,
  23. "name": "walk",
  24. "speed": 4.0
  25. } ]
  26. [sub_resource type="CapsuleShape2D" id=2]
  27. radius = 35.2706
  28. height = 23.3281
  29. [node name="Mob" type="RigidBody2D" groups=[
  30. "mobs",
  31. ]]
  32. collision_mask = 0
  33. gravity_scale = 0.0
  34. script = ExtResource( 1 )
  35. __meta__ = {
  36. "_edit_group_": true
  37. }
  38. [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
  39. scale = Vector2( 0.75, 0.75 )
  40. frames = SubResource( 1 )
  41. animation = "walk"
  42. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  43. rotation = 1.5708
  44. shape = SubResource( 2 )
  45. [node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
  46. [connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]