Main.tscn 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. [gd_scene load_steps=15 format=3 uid="uid://2y3ar4s86yra"]
  2. [ext_resource type="Script" path="res://Main.gd" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://dp478jyugrn7o" path="res://Player.tscn" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://ha0ar5s2c3m4" path="res://Mob.tscn" id="3"]
  5. [ext_resource type="Theme" uid="uid://cqquurjk1i7yw" path="res://ui_theme.tres" id="4_gnyca"]
  6. [ext_resource type="Script" path="res://ScoreLabel.gd" id="6"]
  7. [sub_resource type="BoxShape3D" id="1"]
  8. size = Vector3(60, 2, 60)
  9. [sub_resource type="BoxMesh" id="2"]
  10. size = Vector3(60, 2, 60)
  11. [sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_i5n5q"]
  12. [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_m3njk"]
  13. sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
  14. ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
  15. [sub_resource type="Sky" id="Sky_yutuu"]
  16. sky_material = SubResource("ProceduralSkyMaterial_m3njk")
  17. [sub_resource type="Environment" id="Environment_0tcge"]
  18. background_mode = 2
  19. sky = SubResource("Sky_yutuu")
  20. tonemap_mode = 2
  21. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cr5ed"]
  22. albedo_color = Color(0.635294, 0.211765, 0.0235294, 1)
  23. [sub_resource type="CylinderMesh" id="3"]
  24. material = SubResource("StandardMaterial3D_cr5ed")
  25. radial_segments = 24
  26. rings = 1
  27. [sub_resource type="Curve3D" id="5"]
  28. _data = {
  29. "points": PackedVector3Array(0, 0, 0, 0, 0, 0, 14, 0, -15, 0, 0, 0, 0, 0, 0, -13, 0, -15, 0, 0, 0, 0, 0, 0, -13, 0, 16, 0, 0, 0, 0, 0, 0, 14, 0, 16, 0, 0, 0, 0, 0, 0, 14, 0, -15),
  30. "tilts": PackedFloat32Array(0, 0, 0, 0, 0)
  31. }
  32. point_count = 5
  33. [node name="Main" type="Node"]
  34. script = ExtResource("1")
  35. mob_scene = ExtResource("3")
  36. [node name="Ground" type="StaticBody3D" parent="."]
  37. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
  38. collision_layer = 4
  39. collision_mask = 0
  40. [node name="CollisionShape" type="CollisionShape3D" parent="Ground"]
  41. shape = SubResource("1")
  42. [node name="MeshInstance" type="MeshInstance3D" parent="Ground"]
  43. mesh = SubResource("2")
  44. [node name="Walls" type="StaticBody3D" parent="."]
  45. editor_description = "These invisible walls are used to prevent the player from escaping the playable area.
  46. These walls use WorldBoundaryShape3D collision shapes, which are infinitely large planes
  47. (even though they look finite in the editor)."
  48. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5)
  49. collision_layer = 4
  50. collision_mask = 0
  51. [node name="CollisionShape3D" type="CollisionShape3D" parent="Walls"]
  52. transform = Transform3D(1, 0, 0, 0, 1.31134e-07, 1, 0, -1, 1.31134e-07, 0, 10, 11)
  53. shape = SubResource("WorldBoundaryShape3D_i5n5q")
  54. [node name="CollisionShape3D2" type="CollisionShape3D" parent="Walls"]
  55. transform = Transform3D(-4.37114e-08, 1, -1.31134e-07, 0, 1.31134e-07, 1, 1, 4.37114e-08, -5.73206e-15, -13, 10, -4.76837e-07)
  56. shape = SubResource("WorldBoundaryShape3D_i5n5q")
  57. [node name="CollisionShape3D3" type="CollisionShape3D" parent="Walls"]
  58. transform = Transform3D(4.37114e-08, -1, 2.18557e-07, 3.82137e-15, -2.18557e-07, -1, 1, 4.37114e-08, -5.73206e-15, 14, 10, -4.76837e-07)
  59. shape = SubResource("WorldBoundaryShape3D_i5n5q")
  60. [node name="CollisionShape3D4" type="CollisionShape3D" parent="Walls"]
  61. transform = Transform3D(1, 5.96046e-08, -1.42109e-14, 3.82137e-15, -2.18557e-07, -1, -5.96046e-08, 1, -2.18557e-07, 9.53674e-07, 10, -20)
  62. shape = SubResource("WorldBoundaryShape3D_i5n5q")
  63. [node name="DirectionalLight" type="DirectionalLight3D" parent="."]
  64. transform = Transform3D(0.5, -0.777049, 0.382355, 0, 0.441506, 0.897258, -0.866025, -0.448629, 0.220753, 0, 12.5592, 14.7757)
  65. shadow_enabled = true
  66. shadow_bias = 0.04
  67. shadow_blur = 1.5
  68. directional_shadow_mode = 0
  69. directional_shadow_fade_start = 1.0
  70. directional_shadow_max_distance = 40.0
  71. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  72. environment = SubResource("Environment_0tcge")
  73. [node name="Player" parent="." instance=ExtResource("2")]
  74. [node name="CameraPivot" type="Marker3D" parent="."]
  75. transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0.183514, 0, 0)
  76. [node name="Camera" type="Camera3D" parent="CameraPivot"]
  77. transform = Transform3D(1, 0, 0, 0, 1, -2.98023e-08, 0, 2.98023e-08, 1, 0, 9.53674e-07, 19)
  78. projection = 1
  79. fov = 48.6
  80. size = 24.0
  81. far = 40.0
  82. [node name="Cylinders" type="Node3D" parent="."]
  83. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0, 0)
  84. [node name="MeshInstance" type="MeshInstance3D" parent="Cylinders"]
  85. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1, -15)
  86. mesh = SubResource("3")
  87. [node name="MeshInstance3" type="MeshInstance3D" parent="Cylinders"]
  88. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21, 1, -15)
  89. mesh = SubResource("3")
  90. [node name="MeshInstance2" type="MeshInstance3D" parent="Cylinders"]
  91. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21, 1, 16)
  92. mesh = SubResource("3")
  93. [node name="MeshInstance4" type="MeshInstance3D" parent="Cylinders"]
  94. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 1, 16)
  95. mesh = SubResource("3")
  96. [node name="SpawnPath" type="Path3D" parent="."]
  97. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
  98. curve = SubResource("5")
  99. [node name="SpawnLocation" type="PathFollow3D" parent="SpawnPath"]
  100. transform = Transform3D(-4.37113e-08, 0, 0.999999, 0, 1, 0, -0.999999, 0, -4.37113e-08, 14, 0, -15)
  101. rotation_mode = 1
  102. cubic_interp = false
  103. loop = false
  104. [node name="MobTimer" type="Timer" parent="."]
  105. wait_time = 0.5
  106. autostart = true
  107. [node name="UserInterface" type="Control" parent="."]
  108. layout_mode = 3
  109. anchors_preset = 15
  110. anchor_right = 1.0
  111. anchor_bottom = 1.0
  112. grow_horizontal = 2
  113. grow_vertical = 2
  114. theme = ExtResource("4_gnyca")
  115. [node name="ScoreLabel" type="Label" parent="UserInterface"]
  116. layout_mode = 0
  117. offset_left = 16.0
  118. offset_top = 16.0
  119. offset_right = 77.0
  120. offset_bottom = 42.0
  121. theme_override_colors/font_color = Color(0, 0, 0, 1)
  122. theme_override_font_sizes/font_size = 32
  123. text = "Score: 0"
  124. script = ExtResource("6")
  125. [node name="Retry" type="ColorRect" parent="UserInterface"]
  126. visible = false
  127. layout_mode = 0
  128. anchor_right = 1.0
  129. anchor_bottom = 1.0
  130. color = Color(0, 0, 0, 0.447059)
  131. [node name="Label" type="Label" parent="UserInterface/Retry"]
  132. layout_mode = 1
  133. anchors_preset = 8
  134. anchor_left = 0.5
  135. anchor_top = 0.5
  136. anchor_right = 0.5
  137. anchor_bottom = 0.5
  138. offset_left = -75.0
  139. offset_top = -13.0
  140. offset_right = 75.0
  141. offset_bottom = 13.0
  142. grow_horizontal = 2
  143. grow_vertical = 2
  144. theme_override_font_sizes/font_size = 32
  145. text = "Press Space or Enter to retry"
  146. [connection signal="hit" from="Player" to="." method="_on_player_hit"]
  147. [connection signal="timeout" from="MobTimer" to="." method="_on_mob_timer_timeout"]