main.tscn 13 KB

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