main.tscn 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. [gd_scene load_steps=24 format=2]
  2. [ext_resource path="res://spawner.gd" type="Script" id=1]
  3. [ext_resource path="res://bacteria.tscn" type="PackedScene" id=2]
  4. [ext_resource path="res://restarter.gd" type="Script" id=3]
  5. [ext_resource path="res://Healthpickup.tscn" type="PackedScene" id=4]
  6. [ext_resource path="res://PowerUpControl.gd" type="Script" id=5]
  7. [ext_resource path="res://font/ComfortaaRegular.ttf" type="DynamicFontData" id=6]
  8. [ext_resource path="res://newdynamicfont.tres" type="DynamicFont" id=7]
  9. [ext_resource path="res://buttonsgens.gd" type="Script" id=8]
  10. [ext_resource path="res://font/newdynamicfont.tres" type="DynamicFont" id=9]
  11. [ext_resource path="res://font/newtheme.tres" type="Theme" id=10]
  12. [ext_resource path="res://ui/InterfaceLevelUpNew.png" type="Texture" id=11]
  13. [ext_resource path="res://ui/Area2D2.gd" type="Script" id=12]
  14. [ext_resource path="res://audio.ogg" type="AudioStream" id=13]
  15. [sub_resource type="DynamicFont" id=1]
  16. font_data = ExtResource( 6 )
  17. [sub_resource type="Theme" id=2]
  18. default_font = SubResource( 1 )
  19. [sub_resource type="CircleShape2D" id=3]
  20. radius = 20.0
  21. [sub_resource type="Shader" id=4]
  22. code = "// NOTE: Shader automatically converted from Godot Engine 3.4.4.stable's CanvasItemMaterial.
  23. shader_type canvas_item;
  24. render_mode blend_mix;
  25. uniform sampler2D noise;
  26. uniform sampler2D noise2;
  27. uniform sampler2D grad;
  28. void fragment(){
  29. float col = texture(noise, UV).r * texture(noise2, UV+TIME*0.1).r + 0.3;
  30. COLOR = texture(grad, vec2( round(col)) ) + clamp(col,0.0,0.6) - 0.3;
  31. }"
  32. [sub_resource type="Gradient" id=5]
  33. offsets = PoolRealArray( 0.00833333, 0.970833 )
  34. colors = PoolColorArray( 0.00156975, 0.401855, 0.337356, 1, 0.144711, 0.686035, 0.256252, 1 )
  35. [sub_resource type="GradientTexture" id=6]
  36. gradient = SubResource( 5 )
  37. [sub_resource type="OpenSimplexNoise" id=7]
  38. [sub_resource type="NoiseTexture" id=8]
  39. width = 256
  40. height = 256
  41. noise = SubResource( 7 )
  42. [sub_resource type="NoiseTexture" id=9]
  43. width = 96
  44. height = 96
  45. seamless = true
  46. noise = SubResource( 7 )
  47. [sub_resource type="ShaderMaterial" id=10]
  48. shader = SubResource( 4 )
  49. shader_param/noise = SubResource( 8 )
  50. shader_param/noise2 = SubResource( 9 )
  51. shader_param/grad = SubResource( 6 )
  52. [node name="main" type="YSort"]
  53. position = Vector2( 2, 0 )
  54. [node name="bacteria" parent="." instance=ExtResource( 2 )]
  55. [node name="spawner" type="Node2D" parent="."]
  56. script = ExtResource( 1 )
  57. spawnspeed = 1.0
  58. [node name="spawner2" type="Node2D" parent="."]
  59. script = ExtResource( 1 )
  60. enemy_ = ExtResource( 4 )
  61. spawnspeed = 1.0
  62. [node name="restarter" type="CanvasLayer" parent="."]
  63. pause_mode = 2
  64. script = ExtResource( 3 )
  65. [node name="MarginContainer" type="MarginContainer" parent="restarter"]
  66. visible = false
  67. anchor_right = 1.0
  68. anchor_bottom = 1.0
  69. margin_left = 300.0
  70. margin_right = -300.0
  71. theme = SubResource( 2 )
  72. [node name="VBoxContainer" type="VBoxContainer" parent="restarter/MarginContainer"]
  73. margin_right = 89.0
  74. margin_bottom = 960.0
  75. theme = SubResource( 2 )
  76. alignment = 1
  77. [node name="Label" type="Label" parent="restarter/MarginContainer/VBoxContainer"]
  78. margin_top = 621.0
  79. margin_right = 120.0
  80. margin_bottom = 635.0
  81. custom_fonts/font = ExtResource( 7 )
  82. text = "game over"
  83. align = 1
  84. valign = 1
  85. [node name="Button" type="Button" parent="restarter/MarginContainer/VBoxContainer"]
  86. margin_top = 639.0
  87. margin_right = 120.0
  88. margin_bottom = 659.0
  89. custom_fonts/font = ExtResource( 7 )
  90. text = "restart"
  91. [node name="PowerUpControl" type="CanvasLayer" parent="."]
  92. pause_mode = 2
  93. script = ExtResource( 5 )
  94. [node name="Control" type="MarginContainer" parent="PowerUpControl"]
  95. pause_mode = 2
  96. visible = false
  97. anchor_right = 1.0
  98. anchor_bottom = 1.0
  99. margin_left = 120.0
  100. margin_right = -120.0
  101. theme = SubResource( 2 )
  102. [node name="VSeparator" type="VBoxContainer" parent="PowerUpControl/Control"]
  103. margin_right = 300.0
  104. margin_bottom = 960.0
  105. theme = SubResource( 2 )
  106. alignment = 1
  107. [node name="Label" type="Label" parent="PowerUpControl/Control/VSeparator"]
  108. margin_top = 408.0
  109. margin_right = 300.0
  110. margin_bottom = 427.0
  111. custom_fonts/font = ExtResource( 7 )
  112. text = "Choose a power:"
  113. [node name="ItemList" type="ItemList" parent="PowerUpControl/Control/VSeparator"]
  114. margin_top = 431.0
  115. margin_right = 300.0
  116. margin_bottom = 551.0
  117. rect_min_size = Vector2( 0, 120 )
  118. custom_fonts/font = ExtResource( 7 )
  119. items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false, "Item 3", null, false, "Item 4", null, false ]
  120. [node name="Control2" type="MarginContainer" parent="PowerUpControl"]
  121. pause_mode = 2
  122. visible = false
  123. anchor_right = 1.0
  124. anchor_bottom = 1.0
  125. margin_left = 80.0
  126. margin_right = -80.0
  127. theme = ExtResource( 10 )
  128. [node name="VSeparator" type="VBoxContainer" parent="PowerUpControl/Control2"]
  129. margin_right = 380.0
  130. margin_bottom = 960.0
  131. theme = SubResource( 2 )
  132. alignment = 1
  133. [node name="Label" type="Label" parent="PowerUpControl/Control2/VSeparator"]
  134. margin_top = 154.0
  135. margin_right = 380.0
  136. margin_bottom = 173.0
  137. theme = ExtResource( 10 )
  138. custom_fonts/font = ExtResource( 9 )
  139. text = "Choose a power:"
  140. [node name="ItemList" type="ItemList" parent="PowerUpControl/Control2/VSeparator"]
  141. visible = false
  142. margin_top = 431.0
  143. margin_right = 300.0
  144. margin_bottom = 551.0
  145. rect_min_size = Vector2( 0, 120 )
  146. custom_fonts/font = ExtResource( 7 )
  147. items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false, "Item 3", null, false, "Item 4", null, false ]
  148. [node name="ColorRect" type="ColorRect" parent="PowerUpControl/Control2/VSeparator"]
  149. margin_top = 177.0
  150. margin_right = 380.0
  151. margin_bottom = 777.0
  152. rect_min_size = Vector2( 0, 600 )
  153. color = Color( 0.117647, 0.172549, 0.211765, 1 )
  154. [node name="InterfaceLevelUpNew" type="Sprite" parent="PowerUpControl/Control2/VSeparator/ColorRect"]
  155. position = Vector2( 186, 117 )
  156. scale = Vector2( 0.75, 0.75 )
  157. texture = ExtResource( 11 )
  158. [node name="menbros" type="Node2D" parent="PowerUpControl/Control2/VSeparator"]
  159. self_modulate = Color( 0, 1, 0.952941, 1 )
  160. position = Vector2( 186, 293 )
  161. scale = Vector2( 0.75, 0.75 )
  162. [node name="Area2D2" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
  163. position = Vector2( -177.333, 36 )
  164. scale = Vector2( 1.33333, 1.33333 )
  165. collision_layer = 4
  166. collision_mask = 4
  167. script = ExtResource( 12 )
  168. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D2"]
  169. position = Vector2( 32, 32 )
  170. shape = SubResource( 3 )
  171. [node name="Area2D3" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
  172. position = Vector2( -177.333, -120 )
  173. scale = Vector2( 1.33333, 1.33333 )
  174. collision_layer = 4
  175. collision_mask = 4
  176. script = ExtResource( 12 )
  177. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D3"]
  178. position = Vector2( 32, 32 )
  179. shape = SubResource( 3 )
  180. [node name="Area2D6" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
  181. position = Vector2( -74.6667, 54.6667 )
  182. scale = Vector2( 1.33333, 1.33333 )
  183. collision_layer = 4
  184. collision_mask = 4
  185. script = ExtResource( 12 )
  186. id = 1
  187. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D6"]
  188. position = Vector2( 32, 32 )
  189. shape = SubResource( 3 )
  190. [node name="Area2D7" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
  191. position = Vector2( -74.6667, -141.333 )
  192. scale = Vector2( 1.33333, 1.33333 )
  193. collision_layer = 4
  194. collision_mask = 4
  195. script = ExtResource( 12 )
  196. id = 1
  197. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D7"]
  198. position = Vector2( 32, 32 )
  199. shape = SubResource( 3 )
  200. [node name="Area2D4" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
  201. position = Vector2( 22.6667, 36 )
  202. scale = Vector2( 1.33333, 1.33333 )
  203. collision_layer = 4
  204. collision_mask = 4
  205. script = ExtResource( 12 )
  206. id = 2
  207. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D4"]
  208. position = Vector2( 32, 32 )
  209. shape = SubResource( 3 )
  210. [node name="Area2D5" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
  211. position = Vector2( 22.6667, -120 )
  212. scale = Vector2( 1.33333, 1.33333 )
  213. collision_layer = 4
  214. collision_mask = 4
  215. script = ExtResource( 12 )
  216. id = 2
  217. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D5"]
  218. position = Vector2( 32, 32 )
  219. shape = SubResource( 3 )
  220. [node name="corpo" type="Node2D" parent="PowerUpControl/Control2/VSeparator"]
  221. self_modulate = Color( 1, 0.494118, 0, 1 )
  222. position = Vector2( 186, 293 )
  223. scale = Vector2( 0.75, 0.75 )
  224. [node name="Area2D8" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
  225. position = Vector2( -196, -42.6667 )
  226. scale = Vector2( 1.33333, 1.33333 )
  227. collision_layer = 8
  228. collision_mask = 8
  229. script = ExtResource( 12 )
  230. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D8"]
  231. position = Vector2( 32, 32 )
  232. shape = SubResource( 3 )
  233. [node name="Area2D9" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
  234. position = Vector2( -117.333, -42.6667 )
  235. scale = Vector2( 1.33333, 1.33333 )
  236. collision_layer = 8
  237. collision_mask = 8
  238. script = ExtResource( 12 )
  239. id = 1
  240. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D9"]
  241. position = Vector2( 32, 32 )
  242. shape = SubResource( 3 )
  243. [node name="Area2D10" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
  244. position = Vector2( -38.6667, -42.6667 )
  245. scale = Vector2( 1.33333, 1.33333 )
  246. collision_layer = 8
  247. collision_mask = 8
  248. script = ExtResource( 12 )
  249. id = 2
  250. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D10"]
  251. position = Vector2( 32, 32 )
  252. shape = SubResource( 3 )
  253. [node name="Area2D11" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
  254. position = Vector2( 38.6667, -42.6667 )
  255. scale = Vector2( 1.33333, 1.33333 )
  256. collision_layer = 8
  257. collision_mask = 8
  258. script = ExtResource( 12 )
  259. id = 3
  260. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D11"]
  261. position = Vector2( 32, 32 )
  262. shape = SubResource( 3 )
  263. [node name="Area2D12" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
  264. position = Vector2( 116, -42.6667 )
  265. scale = Vector2( 1.33333, 1.33333 )
  266. collision_layer = 8
  267. collision_mask = 8
  268. script = ExtResource( 12 )
  269. id = 4
  270. [node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D12"]
  271. position = Vector2( 32, 32 )
  272. shape = SubResource( 3 )
  273. [node name="buttons" type="Node2D" parent="PowerUpControl/Control2/VSeparator"]
  274. position = Vector2( 24, 422 )
  275. script = ExtResource( 8 )
  276. [node name="Button" type="Button" parent="PowerUpControl/Control2/VSeparator"]
  277. margin_top = 781.0
  278. margin_right = 380.0
  279. margin_bottom = 806.0
  280. text = "accept"
  281. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  282. layer = -1
  283. [node name="TextureButton" type="ColorRect" parent="CanvasLayer"]
  284. material = SubResource( 10 )
  285. anchor_right = 1.0
  286. anchor_bottom = 1.0
  287. theme = SubResource( 2 )
  288. [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
  289. stream = ExtResource( 13 )
  290. autoplay = true
  291. [connection signal="dieproxy" from="bacteria" to="restarter" method="_on_bacteria_dieproxy"]
  292. [connection signal="level_up" from="bacteria" to="PowerUpControl" method="_on_bacteria_level_up"]
  293. [connection signal="button_down" from="restarter/MarginContainer/VBoxContainer/Button" to="restarter" method="_on_Button_button_down"]
  294. [connection signal="item_activated" from="PowerUpControl/Control/VSeparator/ItemList" to="PowerUpControl" method="_on_ItemList_item_activated"]
  295. [connection signal="item_activated" from="PowerUpControl/Control2/VSeparator/ItemList" to="PowerUpControl" method="_on_ItemList_item_activated"]
  296. [connection signal="button_down" from="PowerUpControl/Control2/VSeparator/Button" to="PowerUpControl" method="_on_Button_button_down"]