Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / role / Enemy.tscn
@小李xl 小李xl on 15 Dec 2022 2 KB 备份
  1. [gd_scene load_steps=20 format=2]
  2.  
  3. [ext_resource path="res://prefab/role/Role.tscn" type="PackedScene" id=1]
  4. [ext_resource path="res://resource/materlal/Blend.gdshader" type="Shader" id=2]
  5. [ext_resource path="res://resource/sprite/role/role8.png" type="Texture" id=3]
  6.  
  7. [sub_resource type="ShaderMaterial" id=1]
  8. resource_local_to_scene = true
  9. shader = ExtResource( 2 )
  10. shader_param/blend = Color( 1, 1, 1, 1 )
  11. shader_param/schedule = 1.0
  12.  
  13. [sub_resource type="ShaderMaterial" id=2]
  14. resource_local_to_scene = true
  15. shader = ExtResource( 2 )
  16. shader_param/blend = Color( 1, 1, 1, 1 )
  17. shader_param/schedule = 0.0
  18.  
  19. [sub_resource type="AtlasTexture" id=7]
  20. atlas = ExtResource( 3 )
  21. region = Rect2( 0, 24, 16, 24 )
  22.  
  23. [sub_resource type="AtlasTexture" id=8]
  24. atlas = ExtResource( 3 )
  25. region = Rect2( 16, 24, 16, 24 )
  26.  
  27. [sub_resource type="AtlasTexture" id=9]
  28. atlas = ExtResource( 3 )
  29. region = Rect2( 32, 24, 16, 24 )
  30.  
  31. [sub_resource type="AtlasTexture" id=10]
  32. atlas = ExtResource( 3 )
  33. region = Rect2( 48, 24, 16, 24 )
  34.  
  35. [sub_resource type="AtlasTexture" id=11]
  36. atlas = ExtResource( 3 )
  37. region = Rect2( 0, 48, 16, 24 )
  38.  
  39. [sub_resource type="AtlasTexture" id=12]
  40. atlas = ExtResource( 3 )
  41. region = Rect2( 16, 48, 16, 24 )
  42.  
  43. [sub_resource type="AtlasTexture" id=13]
  44. atlas = ExtResource( 3 )
  45. region = Rect2( 32, 48, 16, 24 )
  46.  
  47. [sub_resource type="AtlasTexture" id=14]
  48. atlas = ExtResource( 3 )
  49. region = Rect2( 48, 48, 16, 24 )
  50.  
  51. [sub_resource type="AtlasTexture" id=15]
  52. atlas = ExtResource( 3 )
  53. region = Rect2( 0, 48, 16, 24 )
  54.  
  55. [sub_resource type="AtlasTexture" id=16]
  56. atlas = ExtResource( 3 )
  57. region = Rect2( 16, 48, 16, 24 )
  58.  
  59. [sub_resource type="AtlasTexture" id=17]
  60. atlas = ExtResource( 3 )
  61. region = Rect2( 32, 48, 16, 24 )
  62.  
  63. [sub_resource type="AtlasTexture" id=18]
  64. atlas = ExtResource( 3 )
  65. region = Rect2( 48, 48, 16, 24 )
  66.  
  67. [sub_resource type="SpriteFrames" id=19]
  68. animations = [ {
  69. "frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ) ],
  70. "loop": true,
  71. "name": "idle",
  72. "speed": 7.0
  73. }, {
  74. "frames": [ SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ) ],
  75. "loop": true,
  76. "name": "reverseRun",
  77. "speed": 10.0
  78. }, {
  79. "frames": [ SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ) ],
  80. "loop": true,
  81. "name": "run",
  82. "speed": 10.0
  83. } ]
  84.  
  85. [sub_resource type="CircleShape2D" id=20]
  86. radius = 4.0
  87.  
  88. [node name="Enemy" instance=ExtResource( 1 )]
  89. CollisionLayer = 16
  90. CollisionMask = 25
  91.  
  92. [node name="ShadowSprite" parent="." index="0"]
  93. material = SubResource( 1 )
  94.  
  95. [node name="AnimatedSprite" parent="." index="2"]
  96. material = SubResource( 2 )
  97. frames = SubResource( 19 )
  98. playing = true
  99.  
  100. [node name="Collision" parent="." index="3"]
  101. shape = SubResource( 20 )
  102.  
  103. [node name="ViewRay" type="RayCast2D" parent="." index="6"]
  104. position = Vector2( 0, -8 )
  105.  
  106. [node name="NavigationPoint" type="Position2D" parent="." index="8"]
  107. position = Vector2( 0, -5 )
  108.  
  109. [node name="NavigationAgent2D" type="NavigationAgent2D" parent="NavigationPoint" index="0"]
  110. radius = 20.0