Mob.tscn 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [gd_scene load_steps=10 format=3 uid="uid://rkdnhqgf2hpj"]
  2. [ext_resource type="Script" path="res://Mob.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://yqglrrsx7j1f" path="res://art/enemyFlyingAlt_1.png" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://bpot8awhdn6ph" path="res://art/enemyFlyingAlt_2.png" id="3"]
  5. [ext_resource type="Texture2D" uid="uid://bu4221t7qpa7d" path="res://art/enemyWalking_1.png" id="4"]
  6. [ext_resource type="Texture2D" uid="uid://booij5t7h4efb" path="res://art/enemyWalking_2.png" id="5"]
  7. [ext_resource type="Texture2D" uid="uid://5lvm88ij4jqn" path="res://art/enemySwimming_1.png" id="6"]
  8. [ext_resource type="Texture2D" uid="uid://bng45cvsgufqc" path="res://art/enemySwimming_2.png" id="7"]
  9. [sub_resource type="SpriteFrames" id="1"]
  10. animations = [{
  11. "frames": [ExtResource( "6" ), ExtResource( "7" )],
  12. "loop": true,
  13. "name": &"swim",
  14. "speed": 4.0
  15. }, {
  16. "frames": [ExtResource( "2" ), ExtResource( "3" )],
  17. "loop": true,
  18. "name": &"fly",
  19. "speed": 3.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 = 37.0
  28. height = 100.0
  29. [node name="Mob" type="RigidDynamicBody2D" groups=["mobs"]]
  30. collision_mask = 0
  31. gravity_scale = 0.0
  32. script = ExtResource( "1" )
  33. [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
  34. scale = Vector2(0.75, 0.75)
  35. frames = SubResource( "1" )
  36. animation = &"walk"
  37. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  38. rotation = 1.5708
  39. shape = SubResource( "2" )
  40. [node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
  41. [connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]