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