[gd_scene load_steps=27 format=2]

[ext_resource path="res://spawner.gd" type="Script" id=1]
[ext_resource path="res://bacteria.tscn" type="PackedScene" id=2]
[ext_resource path="res://restarter.gd" type="Script" id=3]
[ext_resource path="res://Healthpickup.tscn" type="PackedScene" id=4]
[ext_resource path="res://PowerUpControl.gd" type="Script" id=5]
[ext_resource path="res://font/ComfortaaRegular.ttf" type="DynamicFontData" id=6]
[ext_resource path="res://newdynamicfont.tres" type="DynamicFont" id=7]
[ext_resource path="res://buttonsgens.gd" type="Script" id=8]
[ext_resource path="res://font/newdynamicfont.tres" type="DynamicFont" id=9]
[ext_resource path="res://font/newtheme.tres" type="Theme" id=10]
[ext_resource path="res://ui/InterfaceLevelUpNew.png" type="Texture" id=11]
[ext_resource path="res://ui/Area2D2.gd" type="Script" id=12]
[ext_resource path="res://audio.ogg" type="AudioStream" id=13]
[ext_resource path="res://debug.gd" type="Script" id=14]
[ext_resource path="res://sandtex22.png" type="Texture" id=15]

[sub_resource type="DynamicFont" id=1]
font_data = ExtResource( 6 )

[sub_resource type="Theme" id=2]
default_font = SubResource( 1 )

[sub_resource type="CircleShape2D" id=3]
radius = 20.0

[sub_resource type="GDScript" id=11]
script/source = "extends Sprite

func _process(delta):
	global_position = get_viewport_transform().get_origin() * -1
	region_rect.position.x = get_viewport_transform().get_origin().x * -1
	region_rect.position.y = get_viewport_transform().get_origin().y * -1
#	pass
"

[sub_resource type="Shader" id=4]
code = "// NOTE: Shader automatically converted from Godot Engine 3.4.4.stable's CanvasItemMaterial.

shader_type canvas_item;
render_mode blend_mix;

uniform sampler2D noise;
uniform sampler2D noise2;
uniform sampler2D grad;

void fragment(){
	float col = texture(noise, UV).r * texture(noise2, UV+TIME*0.1).r + 0.3;
	COLOR = texture(grad, vec2( round(col)) ) + clamp(col,0.0,0.6) - 0.3;
}"

[sub_resource type="Gradient" id=5]
offsets = PoolRealArray( 0.00833333, 0.970833 )
colors = PoolColorArray( 0.00156975, 0.401855, 0.337356, 1, 0.144711, 0.686035, 0.256252, 1 )

[sub_resource type="GradientTexture" id=6]
gradient = SubResource( 5 )

[sub_resource type="OpenSimplexNoise" id=7]

[sub_resource type="NoiseTexture" id=8]
width = 256
height = 256
noise = SubResource( 7 )

[sub_resource type="NoiseTexture" id=9]
width = 96
height = 96
seamless = true
noise = SubResource( 7 )

[sub_resource type="ShaderMaterial" id=10]
shader = SubResource( 4 )
shader_param/noise = SubResource( 8 )
shader_param/noise2 = SubResource( 9 )
shader_param/grad = SubResource( 6 )

[node name="main" type="YSort"]
position = Vector2( 2, 0 )

[node name="bacteria" parent="." instance=ExtResource( 2 )]

[node name="spawner" type="Node2D" parent="."]
script = ExtResource( 1 )
spawnspeed = 1.0

[node name="spawner2" type="Node2D" parent="."]
script = ExtResource( 1 )
enemy_ = ExtResource( 4 )
spawnspeed = 1.0

[node name="restarter" type="CanvasLayer" parent="."]
pause_mode = 2
script = ExtResource( 3 )

[node name="MarginContainer" type="MarginContainer" parent="restarter"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 300.0
margin_right = -300.0
theme = SubResource( 2 )

[node name="VBoxContainer" type="VBoxContainer" parent="restarter/MarginContainer"]
margin_right = 89.0
margin_bottom = 960.0
theme = SubResource( 2 )
alignment = 1

[node name="Label" type="Label" parent="restarter/MarginContainer/VBoxContainer"]
margin_top = 621.0
margin_right = 120.0
margin_bottom = 635.0
custom_fonts/font = ExtResource( 7 )
text = "game over"
align = 1
valign = 1

[node name="Button" type="Button" parent="restarter/MarginContainer/VBoxContainer"]
margin_top = 639.0
margin_right = 120.0
margin_bottom = 659.0
custom_fonts/font = ExtResource( 7 )
text = "restart"

[node name="PowerUpControl" type="CanvasLayer" parent="."]
pause_mode = 2
script = ExtResource( 5 )

[node name="Control" type="MarginContainer" parent="PowerUpControl"]
pause_mode = 2
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 120.0
margin_right = -120.0
theme = SubResource( 2 )

[node name="VSeparator" type="VBoxContainer" parent="PowerUpControl/Control"]
margin_right = 300.0
margin_bottom = 960.0
theme = SubResource( 2 )
alignment = 1

[node name="Label" type="Label" parent="PowerUpControl/Control/VSeparator"]
margin_top = 408.0
margin_right = 300.0
margin_bottom = 427.0
custom_fonts/font = ExtResource( 7 )
text = "Choose a power:"

[node name="ItemList" type="ItemList" parent="PowerUpControl/Control/VSeparator"]
margin_top = 431.0
margin_right = 300.0
margin_bottom = 551.0
rect_min_size = Vector2( 0, 120 )
custom_fonts/font = ExtResource( 7 )
items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false, "Item 3", null, false, "Item 4", null, false ]

[node name="Control2" type="MarginContainer" parent="PowerUpControl"]
pause_mode = 2
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 80.0
margin_right = -80.0
theme = ExtResource( 10 )

[node name="VSeparator" type="VBoxContainer" parent="PowerUpControl/Control2"]
margin_right = 380.0
margin_bottom = 960.0
theme = SubResource( 2 )
alignment = 1

[node name="Label" type="Label" parent="PowerUpControl/Control2/VSeparator"]
margin_top = 154.0
margin_right = 380.0
margin_bottom = 173.0
theme = ExtResource( 10 )
custom_fonts/font = ExtResource( 9 )
text = "Choose a power:"

[node name="ItemList" type="ItemList" parent="PowerUpControl/Control2/VSeparator"]
visible = false
margin_top = 431.0
margin_right = 300.0
margin_bottom = 551.0
rect_min_size = Vector2( 0, 120 )
custom_fonts/font = ExtResource( 7 )
items = [ "Item 0", null, false, "Item 1", null, false, "Item 2", null, false, "Item 3", null, false, "Item 4", null, false ]

[node name="ColorRect" type="ColorRect" parent="PowerUpControl/Control2/VSeparator"]
margin_top = 177.0
margin_right = 380.0
margin_bottom = 777.0
rect_min_size = Vector2( 0, 600 )
color = Color( 0.117647, 0.172549, 0.211765, 1 )

[node name="InterfaceLevelUpNew" type="Sprite" parent="PowerUpControl/Control2/VSeparator/ColorRect"]
position = Vector2( 186, 117 )
scale = Vector2( 0.75, 0.75 )
texture = ExtResource( 11 )

[node name="menbros" type="Node2D" parent="PowerUpControl/Control2/VSeparator"]
self_modulate = Color( 0, 1, 0.952941, 1 )
position = Vector2( 186, 293 )
scale = Vector2( 0.75, 0.75 )

[node name="Area2D2" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
position = Vector2( -177.333, 36 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 4
collision_mask = 4
script = ExtResource( 12 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D2"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D3" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
position = Vector2( -177.333, -120 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 4
collision_mask = 4
script = ExtResource( 12 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D3"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D6" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
position = Vector2( -74.6667, 54.6667 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 4
collision_mask = 4
script = ExtResource( 12 )
id = 1

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D6"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D7" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
position = Vector2( -74.6667, -141.333 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 4
collision_mask = 4
script = ExtResource( 12 )
id = 1

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D7"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D4" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
position = Vector2( 22.6667, 36 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 4
collision_mask = 4
script = ExtResource( 12 )
id = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D4"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D5" type="Area2D" parent="PowerUpControl/Control2/VSeparator/menbros"]
position = Vector2( 22.6667, -120 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 4
collision_mask = 4
script = ExtResource( 12 )
id = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/menbros/Area2D5"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="corpo" type="Node2D" parent="PowerUpControl/Control2/VSeparator"]
self_modulate = Color( 1, 0.494118, 0, 1 )
position = Vector2( 186, 293 )
scale = Vector2( 0.75, 0.75 )

[node name="Area2D8" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
position = Vector2( -196, -42.6667 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 8
collision_mask = 8
script = ExtResource( 12 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D8"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D9" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
position = Vector2( -117.333, -42.6667 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 8
collision_mask = 8
script = ExtResource( 12 )
id = 1

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D9"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D10" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
position = Vector2( -38.6667, -42.6667 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 8
collision_mask = 8
script = ExtResource( 12 )
id = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D10"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D11" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
position = Vector2( 38.6667, -42.6667 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 8
collision_mask = 8
script = ExtResource( 12 )
id = 3

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D11"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="Area2D12" type="Area2D" parent="PowerUpControl/Control2/VSeparator/corpo"]
position = Vector2( 116, -42.6667 )
scale = Vector2( 1.33333, 1.33333 )
collision_layer = 8
collision_mask = 8
script = ExtResource( 12 )
id = 4

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerUpControl/Control2/VSeparator/corpo/Area2D12"]
position = Vector2( 32, 32 )
shape = SubResource( 3 )

[node name="buttons" type="Node2D" parent="PowerUpControl/Control2/VSeparator"]
position = Vector2( 24, 422 )
script = ExtResource( 8 )

[node name="Button" type="Button" parent="PowerUpControl/Control2/VSeparator"]
margin_top = 781.0
margin_right = 380.0
margin_bottom = 806.0
text = "accept"

[node name="TextureButton2" type="Sprite" parent="."]
position = Vector2( -2, 0 )
z_index = -255
texture = ExtResource( 15 )
centered = false
region_enabled = true
region_rect = Rect2( 0, 0, 540, 960 )
script = SubResource( 11 )

[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = -1

[node name="TextureButton" type="ColorRect" parent="CanvasLayer"]
visible = false
material = SubResource( 10 )
anchor_right = 1.0
anchor_bottom = 1.0
theme = SubResource( 2 )

[node name="debug" type="Label" parent="CanvasLayer"]
margin_left = 22.0
margin_top = 890.0
margin_right = 96.0
margin_bottom = 938.0
text = "Fps: 60
Vram: 0 mb
ram: 0 mb"
script = ExtResource( 14 )

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 13 )
autoplay = true

[connection signal="dieproxy" from="bacteria" to="restarter" method="_on_bacteria_dieproxy"]
[connection signal="level_up" from="bacteria" to="PowerUpControl" method="_on_bacteria_level_up"]
[connection signal="button_down" from="restarter/MarginContainer/VBoxContainer/Button" to="restarter" method="_on_Button_button_down"]
[connection signal="close_menu" from="PowerUpControl" to="bacteria" method="_on_PowerUpControl_close_menu"]
[connection signal="item_activated" from="PowerUpControl/Control/VSeparator/ItemList" to="PowerUpControl" method="_on_ItemList_item_activated"]
[connection signal="item_activated" from="PowerUpControl/Control2/VSeparator/ItemList" to="PowerUpControl" method="_on_ItemList_item_activated"]
[connection signal="button_down" from="PowerUpControl/Control2/VSeparator/Button" to="PowerUpControl" method="_on_Button_button_down"]
