Newer
Older
DungeonShooting / DungeonShooting_Godot / prefab / weapon / Weapon0003.tscn
@小李xl 小李xl on 28 Jun 2023 3 KB 调整资源目录结构
  1. [gd_scene load_steps=10 format=3 uid="uid://dqy4trli5wcms"]
  2.  
  3. [ext_resource type="Script" path="res://src/game/activity/weapon/gun/Gun.cs" id="1_aeolk"]
  4. [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="2_4yjnk"]
  5. [ext_resource type="SpriteFrames" uid="uid://c7dt1uwdybn5" path="res://resource/spriteFrames/weapon/Weapon0003.tres" id="3_upkjt"]
  6.  
  7.  
  8. [sub_resource type="ShaderMaterial" id="ShaderMaterial_cbiyh"]
  9. resource_local_to_scene = true
  10. shader = ExtResource("2_4yjnk")
  11. shader_parameter/blend = Color(0, 0, 0, 0.470588)
  12. shader_parameter/schedule = 1.0
  13.  
  14. [sub_resource type="ShaderMaterial" id="ShaderMaterial_o36tv"]
  15. resource_local_to_scene = true
  16. shader = ExtResource("2_4yjnk")
  17. shader_parameter/blend = Color(1, 1, 1, 1)
  18. shader_parameter/schedule = 0.0
  19.  
  20. [sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5jk"]
  21. size = Vector2(14, 8)
  22.  
  23. [sub_resource type="Animation" id="Animation_x136i"]
  24. length = 0.001
  25. tracks/0/type = "value"
  26. tracks/0/imported = false
  27. tracks/0/enabled = true
  28. tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule")
  29. tracks/0/interp = 1
  30. tracks/0/loop_wrap = true
  31. tracks/0/keys = {
  32. "times": PackedFloat32Array(0),
  33. "transitions": PackedFloat32Array(1),
  34. "update": 0,
  35. "values": [0]
  36. }
  37.  
  38. [sub_resource type="Animation" id="Animation_3piau"]
  39. resource_name = "floodlight"
  40. length = 3.0
  41. loop_mode = 1
  42. tracks/0/type = "value"
  43. tracks/0/imported = false
  44. tracks/0/enabled = true
  45. tracks/0/path = NodePath("AnimatedSprite:material:shader_parameter/schedule")
  46. tracks/0/interp = 1
  47. tracks/0/loop_wrap = true
  48. tracks/0/keys = {
  49. "times": PackedFloat32Array(0, 2.3, 2.6, 2.7, 3),
  50. "transitions": PackedFloat32Array(1, 1, 1, 1, 1),
  51. "update": 0,
  52. "values": [0, 0, 0.5, 0.5, 0]
  53. }
  54.  
  55. [sub_resource type="AnimationLibrary" id="AnimationLibrary_trkjd"]
  56. _data = {
  57. "RESET": SubResource("Animation_x136i"),
  58. "floodlight": SubResource("Animation_3piau")
  59. }
  60.  
  61. [node name="Weapon0003" type="CharacterBody2D" node_paths=PackedStringArray("FirePoint", "ShellPoint", "GripPoint", "AnimationPlayer", "ShadowSprite", "AnimatedSprite", "Collision")]
  62. collision_layer = 4
  63. script = ExtResource("1_aeolk")
  64. FirePoint = NodePath("AnimatedSprite/FirePoint")
  65. ShellPoint = NodePath("AnimatedSprite/ShellPoint")
  66. GripPoint = NodePath("GripPoint")
  67. AnimationPlayer = NodePath("AnimationPlayer")
  68. ShadowSprite = NodePath("ShadowSprite")
  69. AnimatedSprite = NodePath("AnimatedSprite")
  70. Collision = NodePath("Collision")
  71.  
  72. [node name="ShadowSprite" type="Sprite2D" parent="."]
  73. z_index = -1
  74. material = SubResource("ShaderMaterial_cbiyh")
  75.  
  76. [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."]
  77. material = SubResource("ShaderMaterial_o36tv")
  78. sprite_frames = ExtResource("3_upkjt")
  79.  
  80. [node name="ShellPoint" type="Marker2D" parent="AnimatedSprite"]
  81. position = Vector2(0, -3)
  82.  
  83. [node name="FirePoint" type="Marker2D" parent="AnimatedSprite"]
  84. position = Vector2(9, -2)
  85.  
  86. [node name="GripPoint" type="Marker2D" parent="."]
  87. position = Vector2(-4, 0)
  88.  
  89. [node name="Collision" type="CollisionShape2D" parent="."]
  90. shape = SubResource("RectangleShape2D_3p5jk")
  91.  
  92. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  93. libraries = {
  94. "": SubResource("AnimationLibrary_trkjd")
  95. }