Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / role / Role.tscn
@小李xl 小李xl on 24 Aug 2022 3 KB 架构调整
  1. [gd_scene load_steps=19 format=2]
  2.  
  3. [ext_resource path="res://src/game/role/Role.cs" type="Script" id=1]
  4. [ext_resource path="res://resource/sprite/role/role2.png" type="Texture" id=2]
  5. [ext_resource path="res://resource/sprite/role/role1.png" type="Texture" id=3]
  6.  
  7.  
  8. [sub_resource type="AtlasTexture" id=17]
  9. atlas = ExtResource( 3 )
  10. region = Rect2( 0, 24, 16, 24 )
  11.  
  12. [sub_resource type="AtlasTexture" id=18]
  13. atlas = ExtResource( 3 )
  14. region = Rect2( 16, 24, 16, 24 )
  15.  
  16. [sub_resource type="AtlasTexture" id=19]
  17. atlas = ExtResource( 3 )
  18. region = Rect2( 32, 24, 16, 24 )
  19.  
  20. [sub_resource type="AtlasTexture" id=20]
  21. atlas = ExtResource( 3 )
  22. region = Rect2( 48, 24, 16, 24 )
  23.  
  24. [sub_resource type="AtlasTexture" id=25]
  25. atlas = ExtResource( 3 )
  26. region = Rect2( 48, 48, 16, 24 )
  27.  
  28. [sub_resource type="AtlasTexture" id=26]
  29. atlas = ExtResource( 3 )
  30. region = Rect2( 32, 48, 16, 24 )
  31.  
  32. [sub_resource type="AtlasTexture" id=27]
  33. atlas = ExtResource( 3 )
  34. region = Rect2( 16, 48, 16, 24 )
  35.  
  36. [sub_resource type="AtlasTexture" id=28]
  37. atlas = ExtResource( 3 )
  38. region = Rect2( 0, 48, 16, 24 )
  39.  
  40. [sub_resource type="AtlasTexture" id=21]
  41. atlas = ExtResource( 3 )
  42. region = Rect2( 0, 48, 16, 24 )
  43.  
  44. [sub_resource type="AtlasTexture" id=22]
  45. atlas = ExtResource( 3 )
  46. region = Rect2( 16, 48, 16, 24 )
  47.  
  48. [sub_resource type="AtlasTexture" id=23]
  49. atlas = ExtResource( 3 )
  50. region = Rect2( 32, 48, 16, 24 )
  51.  
  52. [sub_resource type="AtlasTexture" id=24]
  53. atlas = ExtResource( 3 )
  54. region = Rect2( 48, 48, 16, 24 )
  55.  
  56. [sub_resource type="SpriteFrames" id=6]
  57. animations = [ {
  58. "frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ],
  59. "loop": true,
  60. "name": "idle",
  61. "speed": 7.0
  62. }, {
  63. "frames": [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ) ],
  64. "loop": true,
  65. "name": "reverseRun",
  66. "speed": 10.0
  67. }, {
  68. "frames": [ SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ],
  69. "loop": true,
  70. "name": "run",
  71. "speed": 10.0
  72. } ]
  73.  
  74. [sub_resource type="RectangleShape2D" id=16]
  75. extents = Vector2( 5, 4.5 )
  76.  
  77. [sub_resource type="RectangleShape2D" id=29]
  78. extents = Vector2( 5, 7.5 )
  79.  
  80. [node name="Role" type="KinematicBody2D"]
  81. collision_layer = 0
  82. script = ExtResource( 1 )
  83. Texture = ExtResource( 2 )
  84.  
  85. [node name="BackMountPoint" type="Position2D" parent="."]
  86. position = Vector2( 0, -10 )
  87.  
  88. [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
  89. position = Vector2( 0, -12 )
  90. frames = SubResource( 6 )
  91. animation = "idle"
  92. playing = true
  93.  
  94. [node name="Collision" type="CollisionShape2D" parent="."]
  95. visible = false
  96. position = Vector2( 0, -4.5 )
  97. shape = SubResource( 16 )
  98.  
  99. [node name="InteractiveArea" type="Area2D" parent="."]
  100. collision_layer = 0
  101. collision_mask = 4
  102. monitorable = false
  103.  
  104. [node name="Collision" type="CollisionShape2D" parent="InteractiveArea"]
  105. position = Vector2( 0, -4.5 )
  106. shape = SubResource( 16 )
  107.  
  108. [node name="HitArea" type="Area2D" parent="."]
  109. visible = false
  110.  
  111. [node name="CollisionShape2D" type="CollisionShape2D" parent="HitArea"]
  112. visible = false
  113. position = Vector2( 0, -7.5 )
  114. shape = SubResource( 29 )
  115.  
  116. [node name="MountPoint" type="Position2D" parent="."]
  117. position = Vector2( 2, -4 )
  118.  
  119. [connection signal="area_entered" from="InteractiveArea" to="." method="_OnPropsEnter"]
  120. [connection signal="area_exited" from="InteractiveArea" to="." method="_OnPropsExit"]