player.tscn 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. [gd_scene load_steps=28 format=3 uid="uid://cc4idhykjp5f5"]
  2. [ext_resource type="Script" path="res://player/player.gd" id="1"]
  3. [ext_resource type="Script" path="res://player/follow_camera.gd" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://yd1e7ai2k5cr" path="res://player/player.glb" id="3_uccbe"]
  5. [ext_resource type="Texture2D" uid="uid://kujhqacj3v72" path="res://player/controls/osb_up.webp" id="4_lmv6w"]
  6. [ext_resource type="Texture2D" uid="uid://68sox6egj4j7" path="res://player/controls/osb_down.webp" id="5_4oxdy"]
  7. [ext_resource type="Texture2D" uid="uid://r6qxvqi0unib" path="res://player/controls/osb_left.webp" id="6_k2dm4"]
  8. [ext_resource type="AudioStream" uid="uid://cdx3i7hr2acow" path="res://player/sound_shoot.wav" id="7"]
  9. [ext_resource type="Texture2D" uid="uid://bw76q621n8fie" path="res://player/controls/osb_right.webp" id="7_yth2f"]
  10. [ext_resource type="AudioStream" uid="uid://bplqk77bffdxr" path="res://player/sound_jump.wav" id="8"]
  11. [sub_resource type="CapsuleShape3D" id="1"]
  12. radius = 0.4
  13. height = 2.1
  14. [sub_resource type="AnimationNodeAnimation" id="13"]
  15. animation = &"run"
  16. [sub_resource type="AnimationNodeAnimation" id="14"]
  17. animation = &"jump"
  18. [sub_resource type="AnimationNodeAnimation" id="15"]
  19. animation = &"falling"
  20. [sub_resource type="AnimationNodeAnimation" id="16"]
  21. animation = &"shooting_standing"
  22. [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_jij26"]
  23. animation = &"walk"
  24. [sub_resource type="AnimationNodeAnimation" id="17"]
  25. animation = &"idle"
  26. [sub_resource type="AnimationNodeBlend2" id="18"]
  27. [sub_resource type="AnimationNodeBlend2" id="19"]
  28. filter_enabled = true
  29. filters = ["Skeleton/Skeleton3D:MASTER", "Skeleton/Skeleton3D:chest", "Skeleton/Skeleton3D:head", "Skeleton/Skeleton3D:headtracker", "Skeleton/Skeleton3D:hip", "Skeleton/Skeleton3D:l-arm", "Skeleton/Skeleton3D:l-forearm", "Skeleton/Skeleton3D:r-arm", "Skeleton/Skeleton3D:r-forearm", "Skeleton/Skeleton3D:vent", "Skeleton/Skeleton3D:waist"]
  30. [sub_resource type="AnimationNodeBlend2" id="22"]
  31. [sub_resource type="AnimationNodeTimeScale" id="20"]
  32. [sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_lxtyk"]
  33. [sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_bivc5"]
  34. [sub_resource type="AnimationNodeBlendTree" id="23"]
  35. graph_offset = Vector2(-221.364, -194.029)
  36. nodes/Animation/node = SubResource("17")
  37. nodes/Animation/position = Vector2(-260, -400)
  38. "nodes/Animation 2/node" = SubResource("13")
  39. "nodes/Animation 2/position" = Vector2(-260, -160)
  40. "nodes/Animation 3/node" = SubResource("14")
  41. "nodes/Animation 3/position" = Vector2(-260, -40)
  42. "nodes/Animation 4/node" = SubResource("15")
  43. "nodes/Animation 4/position" = Vector2(-260, 80)
  44. "nodes/Animation 5/node" = SubResource("16")
  45. "nodes/Animation 5/position" = Vector2(-260, 200)
  46. "nodes/Animation 6/node" = SubResource("AnimationNodeAnimation_jij26")
  47. "nodes/Animation 6/position" = Vector2(-260, -280)
  48. nodes/air_dir/node = SubResource("18")
  49. nodes/air_dir/position = Vector2(110, 20)
  50. nodes/gun/node = SubResource("19")
  51. nodes/gun/position = Vector2(680, 140)
  52. nodes/output/position = Vector2(880, 140)
  53. nodes/run/node = SubResource("22")
  54. nodes/run/position = Vector2(80, -260)
  55. nodes/scale/node = SubResource("20")
  56. nodes/scale/position = Vector2(260, -120)
  57. nodes/speed/node = SubResource("AnimationNodeBlend2_lxtyk")
  58. nodes/speed/position = Vector2(-80, -200)
  59. nodes/state/node = SubResource("AnimationNodeBlend2_bivc5")
  60. nodes/state/position = Vector2(460, 10)
  61. node_connections = [&"air_dir", 0, &"Animation 3", &"air_dir", 1, &"Animation 4", &"gun", 0, &"state", &"gun", 1, &"Animation 5", &"output", 0, &"gun", &"run", 0, &"Animation", &"run", 1, &"speed", &"scale", 0, &"run", &"speed", 0, &"Animation 6", &"speed", 1, &"Animation 2", &"state", 0, &"scale", &"state", 1, &"air_dir"]
  62. [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_basvh"]
  63. random_pitch = 1.03
  64. streams_count = 1
  65. stream_0/stream = ExtResource("7")
  66. stream_0/weight = 1.0
  67. [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_axa7i"]
  68. random_pitch = 1.03
  69. streams_count = 1
  70. stream_0/stream = ExtResource("8")
  71. stream_0/weight = 1.0
  72. [sub_resource type="Gradient" id="Gradient_p2tu5"]
  73. interpolation_mode = 2
  74. offsets = PackedFloat32Array(0.2, 1)
  75. colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 0)
  76. [sub_resource type="GradientTexture2D" id="GradientTexture2D_kvc1x"]
  77. gradient = SubResource("Gradient_p2tu5")
  78. fill = 1
  79. fill_from = Vector2(0.5, 0.5)
  80. fill_to = Vector2(0.5, 0.01)
  81. [node name="Player" type="CharacterBody3D"]
  82. script = ExtResource("1")
  83. [node name="CollisionCapsule" type="CollisionShape3D" parent="."]
  84. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.05, 0)
  85. shape = SubResource("1")
  86. [node name="Target" type="Node3D" parent="."]
  87. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95244, 0)
  88. [node name="Camera3D" type="Camera3D" parent="Target"]
  89. transform = Transform3D(1, 0, 0, 0, 0.871263, 0.490817, 0, -0.490817, 0.871263, 0, 2.59805, 1.25672)
  90. current = true
  91. fov = 74.0
  92. near = 0.1
  93. script = ExtResource("2")
  94. [node name="Player" parent="." instance=ExtResource("3_uccbe")]
  95. [node name="Skeleton3D" parent="Player/Skeleton" index="0"]
  96. bones/13/rotation = Quaternion(-0.000357303, 0.998602, 0.0504822, -0.0156872)
  97. [node name="Robot" parent="Player/Skeleton/Skeleton3D" index="0"]
  98. layers = 2
  99. [node name="Bullet" type="Marker3D" parent="Player/Skeleton" index="1"]
  100. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.94071, 3.6408, 3.3802)
  101. [node name="CoinCount" type="Label3D" parent="Player/Skeleton" index="2"]
  102. unique_name_in_owner = true
  103. transform = Transform3D(-3.33333, 0, -2.91409e-07, 0, 3.33333, 0, 2.91409e-07, 0, -3.33333, 0, 7.51037, 0.531589)
  104. double_sided = false
  105. no_depth_test = true
  106. modulate = Color(1, 0.8, 0.4, 1)
  107. text = "123"
  108. font_size = 48
  109. [node name="Parallax" type="Label3D" parent="Player/Skeleton/CoinCount"]
  110. transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, 0, 0, -0.01)
  111. double_sided = false
  112. no_depth_test = true
  113. modulate = Color(0.8, 0.64, 0.32, 1)
  114. text = "123"
  115. font_size = 48
  116. [node name="Parallax2" type="Label3D" parent="Player/Skeleton/CoinCount"]
  117. transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, 0, 0, -0.02)
  118. double_sided = false
  119. no_depth_test = true
  120. modulate = Color(0.6, 0.48, 0.24, 1)
  121. text = "123"
  122. font_size = 48
  123. [node name="Parallax3" type="Label3D" parent="Player/Skeleton/CoinCount"]
  124. transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, 0, 0, -0.03)
  125. double_sided = false
  126. no_depth_test = true
  127. modulate = Color(0.4, 0.318667, 0.156, 1)
  128. text = "123"
  129. font_size = 48
  130. [node name="Parallax4" type="Label3D" parent="Player/Skeleton/CoinCount"]
  131. transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, 0, 0, -0.04)
  132. double_sided = false
  133. no_depth_test = true
  134. modulate = Color(0.2, 0.159333, 0.078, 1)
  135. text = "123"
  136. font_size = 48
  137. [node name="AnimationTree" type="AnimationTree" parent="."]
  138. tree_root = SubResource("23")
  139. anim_player = NodePath("../Player/AnimationPlayer")
  140. active = true
  141. parameters/air_dir/blend_amount = 0.0
  142. parameters/gun/blend_amount = 0.0
  143. parameters/run/blend_amount = 0.0
  144. parameters/scale/scale = 1.5
  145. parameters/speed/blend_amount = 0
  146. parameters/state/blend_amount = 0.0
  147. [node name="Forward" type="TouchScreenButton" parent="."]
  148. visible = false
  149. position = Vector2(72, 301)
  150. texture_normal = ExtResource("4_lmv6w")
  151. texture_pressed = ExtResource("4_lmv6w")
  152. passby_press = true
  153. action = "move_forward"
  154. visibility_mode = 1
  155. [node name="Backward" type="TouchScreenButton" parent="."]
  156. visible = false
  157. position = Vector2(72, 365)
  158. texture_normal = ExtResource("5_4oxdy")
  159. texture_pressed = ExtResource("5_4oxdy")
  160. passby_press = true
  161. action = "move_backwards"
  162. visibility_mode = 1
  163. [node name="Left" type="TouchScreenButton" parent="."]
  164. visible = false
  165. position = Vector2(29, 332)
  166. texture_normal = ExtResource("6_k2dm4")
  167. texture_pressed = ExtResource("6_k2dm4")
  168. passby_press = true
  169. action = "move_left"
  170. visibility_mode = 1
  171. [node name="Right" type="TouchScreenButton" parent="."]
  172. visible = false
  173. position = Vector2(114, 332)
  174. texture_normal = ExtResource("7_yth2f")
  175. texture_pressed = ExtResource("7_yth2f")
  176. passby_press = true
  177. action = "move_right"
  178. visibility_mode = 1
  179. [node name="SoundShoot" type="AudioStreamPlayer" parent="."]
  180. stream = SubResource("AudioStreamRandomizer_basvh")
  181. [node name="SoundJump" type="AudioStreamPlayer" parent="."]
  182. stream = SubResource("AudioStreamRandomizer_axa7i")
  183. volume_db = -6.0
  184. [node name="BlobShadow" type="Decal" parent="."]
  185. size = Vector3(1.6, 12, 1.6)
  186. texture_albedo = SubResource("GradientTexture2D_kvc1x")
  187. albedo_mix = 0.8
  188. upper_fade = 3.99999
  189. lower_fade = 1.0
  190. cull_mask = 1048573
  191. [editable path="Player"]