Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / role / Enemy.tscn
@小李xl 小李xl on 10 May 2023 4 KB 添加敌人死亡特效
  1. [gd_scene load_steps=20 format=3 uid="uid://dbrig6dq441wo"]
  2.  
  3. [ext_resource type="PackedScene" uid="uid://b515ti0qinck8" path="res://prefab/role/Role.tscn" id="1_qkqsa"]
  4. [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_1ah5y"]
  5. [ext_resource type="Texture2D" uid="uid://chd2vtesap5cf" path="res://resource/sprite/role/role1.png" id="3_tqhbo"]
  6.  
  7. [sub_resource type="ShaderMaterial" id="ShaderMaterial_8vxx6"]
  8. resource_local_to_scene = true
  9. shader = ExtResource("2_1ah5y")
  10. shader_parameter/blend = Color(0, 0, 0, 0.470588)
  11. shader_parameter/schedule = 1
  12.  
  13. [sub_resource type="ShaderMaterial" id="ShaderMaterial_k8mt5"]
  14. resource_local_to_scene = true
  15. shader = ExtResource("2_1ah5y")
  16. shader_parameter/blend = Color(1, 1, 1, 1)
  17. shader_parameter/schedule = 0
  18.  
  19. [sub_resource type="AtlasTexture" id="AtlasTexture_gx4d0"]
  20. atlas = ExtResource("3_tqhbo")
  21. region = Rect2(0, 0, 16, 24)
  22.  
  23. [sub_resource type="AtlasTexture" id="AtlasTexture_da1qy"]
  24. atlas = ExtResource("3_tqhbo")
  25. region = Rect2(0, 24, 16, 24)
  26.  
  27. [sub_resource type="AtlasTexture" id="AtlasTexture_qr6u5"]
  28. atlas = ExtResource("3_tqhbo")
  29. region = Rect2(16, 24, 16, 24)
  30.  
  31. [sub_resource type="AtlasTexture" id="AtlasTexture_yxi4p"]
  32. atlas = ExtResource("3_tqhbo")
  33. region = Rect2(32, 24, 16, 24)
  34.  
  35. [sub_resource type="AtlasTexture" id="AtlasTexture_1g0j1"]
  36. atlas = ExtResource("3_tqhbo")
  37. region = Rect2(48, 24, 16, 24)
  38.  
  39. [sub_resource type="AtlasTexture" id="AtlasTexture_mqoog"]
  40. atlas = ExtResource("3_tqhbo")
  41. region = Rect2(48, 48, 16, 24)
  42.  
  43. [sub_resource type="AtlasTexture" id="AtlasTexture_6n45h"]
  44. atlas = ExtResource("3_tqhbo")
  45. region = Rect2(32, 48, 16, 24)
  46.  
  47. [sub_resource type="AtlasTexture" id="AtlasTexture_7bfvr"]
  48. atlas = ExtResource("3_tqhbo")
  49. region = Rect2(16, 48, 16, 24)
  50.  
  51. [sub_resource type="AtlasTexture" id="AtlasTexture_jep37"]
  52. atlas = ExtResource("3_tqhbo")
  53. region = Rect2(0, 48, 16, 24)
  54.  
  55. [sub_resource type="AtlasTexture" id="AtlasTexture_n0mff"]
  56. atlas = ExtResource("3_tqhbo")
  57. region = Rect2(0, 48, 16, 24)
  58.  
  59. [sub_resource type="AtlasTexture" id="AtlasTexture_snkia"]
  60. atlas = ExtResource("3_tqhbo")
  61. region = Rect2(16, 48, 16, 24)
  62.  
  63. [sub_resource type="AtlasTexture" id="AtlasTexture_l4qvj"]
  64. atlas = ExtResource("3_tqhbo")
  65. region = Rect2(32, 48, 16, 24)
  66.  
  67. [sub_resource type="AtlasTexture" id="AtlasTexture_yxje3"]
  68. atlas = ExtResource("3_tqhbo")
  69. region = Rect2(48, 48, 16, 24)
  70.  
  71. [sub_resource type="SpriteFrames" id="SpriteFrames_m7t3e"]
  72. animations = [{
  73. "frames": [{
  74. "duration": 1.0,
  75. "texture": SubResource("AtlasTexture_gx4d0")
  76. }],
  77. "loop": true,
  78. "name": &"default",
  79. "speed": 5.0
  80. }, {
  81. "frames": [{
  82. "duration": 1.0,
  83. "texture": SubResource("AtlasTexture_da1qy")
  84. }, {
  85. "duration": 1.0,
  86. "texture": SubResource("AtlasTexture_qr6u5")
  87. }, {
  88. "duration": 1.0,
  89. "texture": SubResource("AtlasTexture_yxi4p")
  90. }, {
  91. "duration": 1.0,
  92. "texture": SubResource("AtlasTexture_1g0j1")
  93. }],
  94. "loop": true,
  95. "name": &"idle",
  96. "speed": 7.0
  97. }, {
  98. "frames": [{
  99. "duration": 1.0,
  100. "texture": SubResource("AtlasTexture_mqoog")
  101. }, {
  102. "duration": 1.0,
  103. "texture": SubResource("AtlasTexture_6n45h")
  104. }, {
  105. "duration": 1.0,
  106. "texture": SubResource("AtlasTexture_7bfvr")
  107. }, {
  108. "duration": 1.0,
  109. "texture": SubResource("AtlasTexture_jep37")
  110. }],
  111. "loop": true,
  112. "name": &"reverseRun",
  113. "speed": 10.0
  114. }, {
  115. "frames": [{
  116. "duration": 1.0,
  117. "texture": SubResource("AtlasTexture_n0mff")
  118. }, {
  119. "duration": 1.0,
  120. "texture": SubResource("AtlasTexture_snkia")
  121. }, {
  122. "duration": 1.0,
  123. "texture": SubResource("AtlasTexture_l4qvj")
  124. }, {
  125. "duration": 1.0,
  126. "texture": SubResource("AtlasTexture_yxje3")
  127. }],
  128. "loop": true,
  129. "name": &"run",
  130. "speed": 10.0
  131. }]
  132.  
  133. [node name="Enemy" instance=ExtResource("1_qkqsa")]
  134. collision_layer = 16
  135. collision_mask = 25
  136.  
  137. [node name="ShadowSprite" parent="." index="0"]
  138. material = SubResource("ShaderMaterial_8vxx6")
  139.  
  140. [node name="AnimatedSprite" parent="." index="2"]
  141. material = SubResource("ShaderMaterial_k8mt5")
  142. sprite_frames = SubResource("SpriteFrames_m7t3e")
  143. frame_progress = 0.877597
  144.  
  145. [node name="HurtArea" parent="." index="4"]
  146. visible = false
  147.  
  148. [node name="ViewRay" type="RayCast2D" parent="." index="6"]
  149. position = Vector2(0, -8)
  150. enabled = false
  151.  
  152. [node name="NavigationPoint" type="Marker2D" parent="." index="8"]
  153. position = Vector2(0, -5)
  154.  
  155. [node name="NavigationAgent2D" type="NavigationAgent2D" parent="NavigationPoint" index="0"]
  156. path_desired_distance = 3.0
  157. target_desired_distance = 3.0
  158. radius = 20.0