Newer
Older
DungeonShooting / prefab / role / Role.tscn
@小李xl 小李xl on 12 Jun 2022 2 KB 添加子弹和弹壳阴影效果
  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=21]
  8. atlas = ExtResource( 3 )
  9. region = Rect2( 0, 48, 16, 24 )
  10.  
  11. [sub_resource type="AtlasTexture" id=22]
  12. atlas = ExtResource( 3 )
  13. region = Rect2( 16, 48, 16, 24 )
  14.  
  15. [sub_resource type="AtlasTexture" id=23]
  16. atlas = ExtResource( 3 )
  17. region = Rect2( 32, 48, 16, 24 )
  18.  
  19. [sub_resource type="AtlasTexture" id=24]
  20. atlas = ExtResource( 3 )
  21. region = Rect2( 48, 48, 16, 24 )
  22.  
  23. [sub_resource type="AtlasTexture" id=25]
  24. atlas = ExtResource( 3 )
  25. region = Rect2( 48, 48, 16, 24 )
  26.  
  27. [sub_resource type="AtlasTexture" id=26]
  28. atlas = ExtResource( 3 )
  29. region = Rect2( 32, 48, 16, 24 )
  30.  
  31. [sub_resource type="AtlasTexture" id=27]
  32. atlas = ExtResource( 3 )
  33. region = Rect2( 16, 48, 16, 24 )
  34.  
  35. [sub_resource type="AtlasTexture" id=28]
  36. atlas = ExtResource( 3 )
  37. region = Rect2( 0, 48, 16, 24 )
  38.  
  39. [sub_resource type="AtlasTexture" id=17]
  40. atlas = ExtResource( 3 )
  41. region = Rect2( 0, 24, 16, 24 )
  42.  
  43. [sub_resource type="AtlasTexture" id=18]
  44. atlas = ExtResource( 3 )
  45. region = Rect2( 16, 24, 16, 24 )
  46.  
  47. [sub_resource type="AtlasTexture" id=19]
  48. atlas = ExtResource( 3 )
  49. region = Rect2( 32, 24, 16, 24 )
  50.  
  51. [sub_resource type="AtlasTexture" id=20]
  52. atlas = ExtResource( 3 )
  53. region = Rect2( 48, 24, 16, 24 )
  54.  
  55. [sub_resource type="SpriteFrames" id=6]
  56. animations = [ {
  57. "frames": [ SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ],
  58. "loop": true,
  59. "name": "run",
  60. "speed": 10.0
  61. }, {
  62. "frames": [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ) ],
  63. "loop": true,
  64. "name": "reverseRun",
  65. "speed": 10.0
  66. }, {
  67. "frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ],
  68. "loop": true,
  69. "name": "idle",
  70. "speed": 7.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 = 3
  89. playing = true
  90.  
  91. [node name="HitArea" type="Area2D" parent="."]
  92.  
  93. [node name="CollisionShape2D" type="CollisionShape2D" parent="HitArea"]
  94. visible = false
  95. position = Vector2( 0, -7.5 )
  96. shape = SubResource( 29 )
  97.  
  98. [node name="Collision" type="CollisionShape2D" parent="."]
  99. position = Vector2( 0, -4.5 )
  100. shape = SubResource( 16 )
  101.  
  102. [node name="MountPoint" type="Position2D" parent="."]
  103. position = Vector2( 2, -4 )