GirlMob.tscn 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. [gd_scene load_steps=18 format=2]
  2. [ext_resource path="res://asset/body.tres" type="SpriteFrames" id=1]
  3. [ext_resource path="res://script/Boots.gd" type="Script" id=2]
  4. [ext_resource path="res://asset/hair_brown.tres" type="SpriteFrames" id=3]
  5. [ext_resource path="res://asset/lady2-Boots.png" type="Texture" id=4]
  6. [ext_resource path="res://script/Body.gd" type="Script" id=5]
  7. [ext_resource path="res://script/GirlMobNPC.gd" type="Script" id=6]
  8. [ext_resource path="res://script/Hair.gd" type="Script" id=7]
  9. [ext_resource path="res://scene/JumpCollider.tscn" type="PackedScene" id=8]
  10. [ext_resource path="res://scene/StairCollider.tscn" type="PackedScene" id=9]
  11. [ext_resource path="res://scene/Walker.tscn" type="PackedScene" id=10]
  12. [sub_resource type="AtlasTexture" id=2]
  13. atlas = ExtResource( 4 )
  14. region = Rect2( 32, 0, 32, 33 )
  15. [sub_resource type="AtlasTexture" id=3]
  16. atlas = ExtResource( 4 )
  17. region = Rect2( 64, 0, 32, 33 )
  18. [sub_resource type="AtlasTexture" id=1]
  19. atlas = ExtResource( 4 )
  20. region = Rect2( 0, 0, 32, 33 )
  21. [sub_resource type="SpriteFrames" id=4]
  22. animations = [ {
  23. "frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 1 ) ],
  24. "loop": true,
  25. "name": "default",
  26. "speed": 12.0
  27. } ]
  28. [sub_resource type="RectangleShape2D" id=21]
  29. resource_local_to_scene = true
  30. extents = Vector2( 3, 8 )
  31. [sub_resource type="RectangleShape2D" id=22]
  32. extents = Vector2( 8, 8 )
  33. [sub_resource type="RectangleShape2D" id=23]
  34. extents = Vector2( 12, 18.5 )
  35. [node name="GirlMob" type="KinematicBody2D"]
  36. collision_layer = 3
  37. collision/safe_margin = 0.1
  38. script = ExtResource( 6 )
  39. [node name="Walker" parent="." instance=ExtResource( 10 )]
  40. [node name="Boots" type="AnimatedSprite" parent="."]
  41. frames = SubResource( 4 )
  42. frame = 2
  43. flip_h = true
  44. script = ExtResource( 2 )
  45. [node name="Body" type="AnimatedSprite" parent="."]
  46. frames = ExtResource( 1 )
  47. frame = 2
  48. playing = true
  49. flip_h = true
  50. script = ExtResource( 5 )
  51. [node name="Hair" type="AnimatedSprite" parent="."]
  52. frames = ExtResource( 3 )
  53. frame = 2
  54. playing = true
  55. flip_h = true
  56. script = ExtResource( 7 )
  57. [node name="CollisionTorso" type="CollisionShape2D" parent="."]
  58. position = Vector2( 0, 8 )
  59. shape = SubResource( 21 )
  60. [node name="CollisionHead" type="CollisionShape2D" parent="."]
  61. position = Vector2( 0, -6 )
  62. rotation = -1.5708
  63. shape = SubResource( 22 )
  64. [node name="JustFallenTimer" type="Timer" parent="."]
  65. wait_time = 0.5
  66. one_shot = true
  67. [node name="JumpGraceTimer" type="Timer" parent="."]
  68. wait_time = 0.4
  69. one_shot = true
  70. [node name="JustJumpedTimer" type="Timer" parent="."]
  71. wait_time = 0.3
  72. one_shot = true
  73. [node name="StairColliderL" parent="." instance=ExtResource( 9 )]
  74. position = Vector2( -4, 17 )
  75. [node name="StairColliderR" parent="." instance=ExtResource( 9 )]
  76. position = Vector2( 4, 17 )
  77. [node name="JumpColliderG" parent="." instance=ExtResource( 8 )]
  78. position = Vector2( 19, 19 )
  79. [node name="JumpColliderB" parent="." instance=ExtResource( 8 )]
  80. position = Vector2( 19, 19 )
  81. [node name="StairColliderJCB" parent="." instance=ExtResource( 9 )]
  82. position = Vector2( 19, 19 )
  83. [node name="ColliderLine" type="Line2D" parent="."]
  84. points = PoolVector2Array( -25, 3, 30, 4 )
  85. width = 3.0
  86. default_color = Color( 0.635294, 0, 0.537255, 1 )
  87. [node name="Thorns" type="Area2D" parent="."]
  88. collision_layer = 16
  89. collision_mask = 16
  90. [node name="CollisionShape2D" type="CollisionShape2D" parent="Thorns"]
  91. position = Vector2( 0, 0.5 )
  92. shape = SubResource( 23 )
  93. [connection signal="frame_changed" from="Boots" to="Boots" method="_on_frame_changed"]
  94. [connection signal="animation_finished" from="Body" to="Body" method="_on_animation_finished"]
  95. [connection signal="animation_finished" from="Hair" to="Hair" method="_on_animation_finished"]
  96. [connection signal="body_entered" from="Thorns" to="." method="_kill_the_player"]