[gd_scene load_steps=34 format=3 uid="uid://y1qa1g3ic8sp"]

[ext_resource type="Script" uid="uid://cvejbo3srx8py" path="res://Scripts/level.gd" id="1_ws6nn"]
[ext_resource type="PackedScene" uid="uid://d2yv447trxkwt" path="res://Scenes/enemy_spawner.tscn" id="3_5imwp"]
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="3_6od8s"]
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Enemies/EyeDog/eye_dog.tres" id="3_j6d65"]
[ext_resource type="Resource" uid="uid://dxi17xvdlhkvc" path="res://Enemies/ElderEyeDog/elder_eye_dog.tres" id="5_j6d65"]
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="6_ks6qx"]
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Enemies/Crystalisk/crystalisk.tres" id="9_4gdda"]
[ext_resource type="PackedScene" uid="uid://1b2ikdanl66b" path="res://Scenes/CardPrinter/card_printer.tscn" id="9_r25gu"]
[ext_resource type="Script" uid="uid://cxwtuxytavfu5" path="res://Scripts/enemy_goal.gd" id="9_s3rd7"]
[ext_resource type="Script" uid="uid://yk54owkf7pgj" path="res://Scripts/cinema_cam.gd" id="9_xuyhn"]
[ext_resource type="PackedScene" uid="uid://iohlxrso4bl8" path="res://Worlds/GreenPlanet/Decorations/tree.tscn" id="10_7v1co"]
[ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://Audio/shot1.wav" id="11_l537x"]
[ext_resource type="PackedScene" uid="uid://d3h3lmlf3hljl" path="res://Worlds/GreenPlanet/Decorations/bush.tscn" id="16_lhsvw"]
[ext_resource type="PackedScene" uid="uid://7g3jev3v6d3l" path="res://Scenes/ShopStand/shop_stand.tscn" id="19_h6brl"]
[ext_resource type="PackedScene" uid="uid://cmneu5o0m02l8" path="res://Worlds/GreenPlanet/Enemies/leaping_enemy.tscn" id="20_ttr7n"]
[ext_resource type="PackedScene" uid="uid://c6isprnkaliqr" path="res://remix_table.tscn" id="21_ks6qx"]
[ext_resource type="PackedScene" uid="uid://2vv6mrxiwibf" path="res://Scenes/FlowField/flow_field_tool_output.tscn" id="24_sbix1"]
[ext_resource type="Script" uid="uid://cy6oj2hr8q8br" path="res://Scripts/killbox.gd" id="26_tuncf"]
[ext_resource type="PackedScene" uid="uid://c2avjln5vmr0y" path="res://Scenes/Shredder/shredder.tscn" id="27_gppb4"]
[ext_resource type="Texture2D" uid="uid://dqrfgw65d0sq8" path="res://Assets/Textures/bridge_map.png" id="28_6od8s"]
[ext_resource type="PackedScene" uid="uid://ca174636iktc6" path="res://Worlds/GreenPlanet/Levels/Bridge/bridge.glb" id="30_ttr7n"]

[sub_resource type="Curve3D" id="Curve3D_3rdl2"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 12.3765, 1.00006, -13.0874, 0, 0, 0, 0, 0, 0, -13.1528, 5.17887, -14.4739),
"tilts": PackedFloat32Array(0, 0)
}
point_count = 2

[sub_resource type="Curve3D" id="Curve3D_2yu5t"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 7.20375, 0.376301, -5.50257, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"tilts": PackedFloat32Array(0, 0)
}
point_count = 2

[sub_resource type="Curve3D" id="Curve3D_tuqlc"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -19.16, 4.995, -7.5, 0, 0, 0, 0, 0, 0, 8.763, 5.707, -7.5),
"tilts": PackedFloat32Array(0, 0)
}
point_count = 2

[sub_resource type="Shader" id="Shader_6od8s"]
code = "shader_type sky;
render_mode use_debanding;

uniform vec4 sky_top_color : source_color = vec4(0.385, 0.454, 0.55, 1.0);
uniform vec4 sky_horizon_color : source_color = vec4(0.646, 0.656, 0.67, 1.0);
uniform float sky_curve : hint_range(0, 1) = 0.15;
uniform float sky_energy = 1.0; // In Lux.
uniform sampler2D sky_cover : filter_linear, source_color, hint_default_black;
uniform vec4 sky_cover_modulate : source_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform vec4 ground_bottom_color : source_color = vec4(0.2, 0.169, 0.133, 1.0);
uniform vec4 ground_horizon_color : source_color = vec4(0.646, 0.656, 0.67, 1.0);
uniform float ground_curve : hint_range(0, 1) = 0.02;
uniform float ground_energy = 1.0;
uniform float sun_angle_max = 30.0;
uniform float sun_curve : hint_range(0, 1) = 0.15;
uniform float exposure : hint_range(0, 128) = 1.0;

// Wind offset direction (x and y only)
uniform vec2 wind_offset_direction = vec2(0.5, 0.1); // Control direction of offset (x, y)
uniform float wind_speed : hint_range(0.0, 25.0) = 1.0; // Speed of the noise movement over time

// Cloud change settings
uniform bool clouds_change = true; // Whether to change the cloud layer or not
uniform float cloud_change_rate : hint_range(0.0, 5.0) = .40; // Rate at which the cloud effect changes

// Pole blending parameters
uniform float pole_blend_shape : hint_range(0.0, 2.0) = 0.05; // How much the noise affects the blend shape
uniform float pole_blend_strength : hint_range(0, 1) = 0.05; // Control blending intensity at poles
uniform float pole_blend_brightness : hint_range(0.0, 1.0) = .3;

// Horizon blending parameters - similar to pole blending
uniform float horizon_blend_shape : hint_range(0.0, 2.0) = 0.05; // How much the noise affects the horizon blend shape
uniform float horizon_blend_strength : hint_range(0, 1) = 0.05; // Control blending intensity at horizon
uniform float horizon_blend_brightness : hint_range(0.0, 1.0) = .3;
uniform float horizon_blend_width : hint_range(0.0, 0.5) = 0.1; // Width of the horizon blend region

void sky() {
    float v_angle = acos(clamp(EYEDIR.y, -1.0, 1.0));
    float c = (1.0 - v_angle / (PI * 0.5));
    vec3 sky = mix(sky_horizon_color.rgb, sky_top_color.rgb, clamp(1.0 - pow(1.0 - c, 1.0 / sky_curve), 0.0, 1.0));
    sky *= sky_energy;

    if (LIGHT0_ENABLED) {
        float sun_angle = acos(dot(LIGHT0_DIRECTION, EYEDIR));
        if (sun_angle < LIGHT0_SIZE) {
            sky = LIGHT0_COLOR * LIGHT0_ENERGY;
        } else if (sun_angle < sun_angle_max) {
            float c2 = (sun_angle - LIGHT0_SIZE) / (sun_angle_max - LIGHT0_SIZE);
            sky = mix(LIGHT0_COLOR * LIGHT0_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0));
        }
    }

    if (LIGHT1_ENABLED) {
        float sun_angle = acos(dot(LIGHT1_DIRECTION, EYEDIR));
        if (sun_angle < LIGHT1_SIZE) {
            sky = LIGHT1_COLOR * LIGHT1_ENERGY;
        } else if (sun_angle < sun_angle_max) {
            float c2 = (sun_angle - LIGHT1_SIZE) / (sun_angle_max - LIGHT1_SIZE);
            sky = mix(LIGHT1_COLOR * LIGHT1_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0));
        }
    }

    if (LIGHT2_ENABLED) {
        float sun_angle = acos(dot(LIGHT2_DIRECTION, EYEDIR));
        if (sun_angle < LIGHT2_SIZE) {
            sky = LIGHT2_COLOR * LIGHT2_ENERGY;
        } else if (sun_angle < sun_angle_max) {
            float c2 = (sun_angle - LIGHT2_SIZE) / (sun_angle_max - LIGHT2_SIZE);
            sky = mix(LIGHT2_COLOR * LIGHT2_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0));
        }
    }

    if (LIGHT3_ENABLED) {
        float sun_angle = acos(dot(LIGHT3_DIRECTION, EYEDIR));
        if (sun_angle < LIGHT3_SIZE) {
            sky = LIGHT3_COLOR * LIGHT3_ENERGY;
        } else if (sun_angle < sun_angle_max) {
            float c2 = (sun_angle - LIGHT3_SIZE) / (sun_angle_max - LIGHT3_SIZE);
            sky = mix(LIGHT3_COLOR * LIGHT3_ENERGY, sky, clamp(1.0 - pow(1.0 - c2, 1.0 / sun_curve), 0.0, 1.0));
        }
    }

    // Sample the sky cover texture with dynamic offset (only x and y direction)
    vec2 noise_coords = SKY_COORDS.xy + wind_offset_direction * wind_speed * TIME * 0.01;

    // Wrap UVs to keep tiling seamless
    noise_coords = mod(noise_coords, 1.0);

    // Sample the original noise texture
    vec4 sky_cover_texture = texture(sky_cover, noise_coords);

    // Sample flipped noise for Z-offset effect
    vec4 flipped_noise = texture(sky_cover, vec2(noise_coords.x, 1.0 - noise_coords.y));

    // Z blending (cloud change) logic
    float cloud_blend_factor = 0.0;
    if (clouds_change) {
        // Use a sine wave to blend clouds smoothly over time based on the cloud_change_rate
        cloud_blend_factor = 0.5 + 0.5 * sin(TIME * cloud_change_rate);
    }

    // Blend between the original and flipped noise using cloud_blend_factor
    vec4 blended_noise_texture = mix(sky_cover_texture, flipped_noise, cloud_blend_factor);

    // Pole blending
    float base_pole_blend_factor = abs(EYEDIR.y);  // Original blend factor (circular)
    float noise_pole_blend = blended_noise_texture.r * pole_blend_shape;
    float pole_blend_factor = smoothstep(1.0 - pole_blend_strength, 1.0, base_pole_blend_factor + noise_pole_blend);
    
    // Horizon blending - detect when we're near the horizon
    float horizon_distance = abs(EYEDIR.y);  // This will be close to 0 near the horizon
    float horizon_factor = 1.0 - smoothstep(0.0, horizon_blend_width, horizon_distance);
    float noise_horizon_blend = blended_noise_texture.g * horizon_blend_shape;
    float horizon_blend_factor = smoothstep(1.0 - horizon_blend_strength, 1.0, horizon_factor + noise_horizon_blend);
    
    // Combine both blend factors (poles and horizon)
    float combined_blend_factor = max(pole_blend_factor, horizon_blend_factor);
    
    // Blend noise with brightness value based on the combined factor
    vec3 blended_noise = mix(blended_noise_texture.rgb, vec3(pole_blend_brightness), pole_blend_factor);
    blended_noise = mix(blended_noise, vec3(horizon_blend_brightness), horizon_blend_factor);

    sky += (blended_noise * sky_cover_modulate.rgb) * blended_noise_texture.a * sky_cover_modulate.a * sky_energy;

    // Ground blending
    c = (v_angle - (PI * 0.5)) / (PI * 0.5);
    vec3 ground = mix(ground_horizon_color.rgb, ground_bottom_color.rgb, clamp(1.0 - pow(1.0 - c, 1.0 / ground_curve), 0.0, 1.0));
    ground *= ground_energy;

    COLOR = mix(ground, sky, step(0.0, EYEDIR.y)) * exposure;
}"

[sub_resource type="Gradient" id="Gradient_dj4cy"]
offsets = PackedFloat32Array(0.151786, 0.5625, 1)
colors = PackedColorArray(0, 0, 0, 1, 0.565217, 0.565217, 0.565217, 1, 1, 1, 1, 1)

[sub_resource type="FastNoiseLite" id="FastNoiseLite_ttr7n"]
noise_type = 3
domain_warp_enabled = true

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_r4es0"]
width = 1024
height = 1024
seamless = true
color_ramp = SubResource("Gradient_dj4cy")
noise = SubResource("FastNoiseLite_ttr7n")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_4gdda"]
shader = SubResource("Shader_6od8s")
shader_parameter/sky_top_color = Color(0.25262, 0.408375, 0.692798, 1)
shader_parameter/sky_horizon_color = Color(0.48476, 0.638261, 0.884351, 1)
shader_parameter/sky_curve = 0.0349887
shader_parameter/sky_energy = 1.0
shader_parameter/sky_cover = SubResource("NoiseTexture2D_r4es0")
shader_parameter/sky_cover_modulate = Color(1, 1, 1, 1)
shader_parameter/ground_bottom_color = Color(0.121409, 0.203944, 0.437026, 1)
shader_parameter/ground_horizon_color = Color(0.486275, 0.639216, 0.882353, 1)
shader_parameter/ground_curve = 0.02
shader_parameter/ground_energy = 1.0
shader_parameter/sun_angle_max = 0.523599
shader_parameter/sun_curve = 0.15
shader_parameter/exposure = 1.0
shader_parameter/wind_offset_direction = Vector2(0.5, 0.1)
shader_parameter/wind_speed = 0.0
shader_parameter/clouds_change = true
shader_parameter/cloud_change_rate = 0.4
shader_parameter/pole_blend_shape = 0.05
shader_parameter/pole_blend_strength = 0.05
shader_parameter/pole_blend_brightness = 0.3
shader_parameter/horizon_blend_shape = 0.05
shader_parameter/horizon_blend_strength = 0.05
shader_parameter/horizon_blend_brightness = 0.3
shader_parameter/horizon_blend_width = 0.1

[sub_resource type="Sky" id="Sky_t42h5"]
sky_material = SubResource("ShaderMaterial_4gdda")

[sub_resource type="Environment" id="Environment_l41d0"]
background_mode = 2
sky = SubResource("Sky_t42h5")
ssao_radius = 0.01
fog_light_energy = 1.1
fog_density = 0.0416
adjustment_contrast = 2.18

[sub_resource type="BoxShape3D" id="BoxShape3D_awjk1"]

[sub_resource type="BoxShape3D" id="BoxShape3D_134um"]
size = Vector3(70.0478, 1, 73.4615)

[node name="Bridge" type="Node3D" node_paths=PackedStringArray("tower_path", "player_spawns", "enemy_spawns", "enemy_goals", "corpses", "flow_field", "cinematic_cam", "printer", "shop")]
script = ExtResource("1_ws6nn")
enemy_pool = Array[ExtResource("3_6od8s")]([ExtResource("3_j6d65"), ExtResource("9_4gdda"), ExtResource("5_j6d65"), ExtResource("6_ks6qx")])
tower_path = NodePath("Towers")
player_spawns = [NodePath("PlayerSpawnLocations/PlayerSpawn1"), NodePath("PlayerSpawnLocations/PlayerSpawn2"), NodePath("PlayerSpawnLocations/PlayerSpawn3"), NodePath("PlayerSpawnLocations/PlayerSpawn4")]
enemy_spawns = [NodePath("GroundSpawn"), NodePath("GroundSpawn2"), NodePath("GroundSpawn3"), NodePath("GroundSpawn4"), NodePath("GroundSpawn5"), NodePath("AirSpawn")]
enemy_goals = [NodePath("EnemyGoal")]
corpses = NodePath("Corpses")
flow_field = NodePath("FlowField2")
cinematic_cam = NodePath("CinemaCam")
printer = NodePath("CardPrinter")
shop = NodePath("ShopStand")
metadata/_custom_type_script = "uid://cvejbo3srx8py"
metadata/_editor_floor_ = Vector3(4, -10, 8)

[node name="CinemaCam" type="Node3D" parent="." node_paths=PackedStringArray("path_follows", "cameras")]
script = ExtResource("9_xuyhn")
path_follows = [NodePath("Path3D/PathFollow3D"), NodePath("Path3D2/PathFollow3D2"), NodePath("Path3D3/PathFollow3D2")]
cameras = [NodePath("Path3D/PathFollow3D/Camera3D"), NodePath("Path3D2/PathFollow3D2/Camera3D2"), NodePath("Path3D3/PathFollow3D2/Camera3D2")]
pan_speed = 0.1
does_its_thing = false

[node name="Path3D" type="Path3D" parent="CinemaCam"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.63136, 4.35346, 7.28324)
curve = SubResource("Curve3D_3rdl2")

[node name="PathFollow3D" type="PathFollow3D" parent="CinemaCam/Path3D"]
transform = Transform3D(0.05423, 0.161068, 0.98545, -7.45055e-09, 0.986902, -0.161305, -0.998524, 0.00874761, 0.05352, 12.3765, 1.00006, -13.0874)
loop = false

[node name="Camera3D" type="Camera3D" parent="CinemaCam/Path3D/PathFollow3D"]
transform = Transform3D(0.377958, -0.631677, 0.676854, -0.157445, 0.676581, 0.71934, -0.912337, -0.378447, 0.156264, 0, 0, 0)
cull_mask = 1
current = true

[node name="Path3D2" type="Path3D" parent="CinemaCam"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.63136, 4.35346, 7.28324)
curve = SubResource("Curve3D_2yu5t")

[node name="PathFollow3D2" type="PathFollow3D" parent="CinemaCam/Path3D2"]
transform = Transform3D(-0.607018, -0.0329605, 0.793996, 0, 0.999137, 0.0414758, -0.794684, 0.0251768, -0.606492, 7.20375, 0.376301, -5.50257)
loop = false

[node name="Camera3D2" type="Camera3D" parent="CinemaCam/Path3D2/PathFollow3D2"]
transform = Transform3D(-0.107807, 0.47109, -0.875476, -0.0383335, 0.877983, 0.47716, 0.993435, 0.0850012, -0.0765942, 0, 0, 0)
cull_mask = 1

[node name="Path3D3" type="Path3D" parent="CinemaCam"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.63136, 4.35346, 7.28324)
curve = SubResource("Curve3D_tuqlc")

[node name="PathFollow3D2" type="PathFollow3D" parent="CinemaCam/Path3D3"]
transform = Transform3D(-4.37112e-08, -0.0254899, -0.99965, 0, 0.999656, -0.0254898, 0.999996, -1.1142e-09, -4.36961e-08, 8.763, 5.707, -7.5)
progress = 27.9321
loop = false

[node name="Camera3D2" type="Camera3D" parent="CinemaCam/Path3D3/PathFollow3D2"]
transform = Transform3D(3.27007e-05, 0.999663, -0.0260566, -0.00250896, 0.0260566, 0.99966, 0.999999, 3.26858e-05, 0.00250896, 0, 0, 0)
cull_mask = 1

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_l41d0")

[node name="EnemyGoal" type="Node3D" parent="." node_paths=PackedStringArray("audio_player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 40, 0.5, 0)
script = ExtResource("9_s3rd7")
audio_player = NodePath("AudioStreamPlayer3D")

[node name="CSGBox3D" type="CSGBox3D" parent="EnemyGoal"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
size = Vector3(1, 4, 3)

[node name="Area3D" type="Area3D" parent="EnemyGoal"]
collision_mask = 4

[node name="CollisionShape3D" type="CollisionShape3D" parent="EnemyGoal/Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("BoxShape3D_awjk1")

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="EnemyGoal"]
stream = ExtResource("11_l537x")

[node name="GroundSpawn" parent="." node_paths=PackedStringArray("flow_field", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -43.4011, 0.5, 0)
leap_enemy_scene = ExtResource("20_ttr7n")
flow_field = NodePath("../FlowField2")
type = 1
dest = NodePath("../EnemyGoal")
enemy_path = NodePath("../Enemies")

[node name="GroundSpawn2" parent="." node_paths=PackedStringArray("flow_field", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -40.9011, 0.5, -5)
leap_enemy_scene = ExtResource("20_ttr7n")
flow_field = NodePath("../FlowField2")
own_id = 1
type = 1
dest = NodePath("../EnemyGoal")
enemy_path = NodePath("../Enemies")

[node name="GroundSpawn3" parent="." node_paths=PackedStringArray("flow_field", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -40.9011, 0.5, 5)
leap_enemy_scene = ExtResource("20_ttr7n")
flow_field = NodePath("../FlowField2")
own_id = 2
type = 1
dest = NodePath("../EnemyGoal")
enemy_path = NodePath("../Enemies")

[node name="GroundSpawn4" parent="." node_paths=PackedStringArray("flow_field", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38.4011, 0.5, 10)
leap_enemy_scene = ExtResource("20_ttr7n")
flow_field = NodePath("../FlowField2")
own_id = 3
type = 1
dest = NodePath("../EnemyGoal")
enemy_path = NodePath("../Enemies")

[node name="GroundSpawn5" parent="." node_paths=PackedStringArray("flow_field", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38.4011, 0.5, -10)
leap_enemy_scene = ExtResource("20_ttr7n")
flow_field = NodePath("../FlowField2")
own_id = 4
type = 1
dest = NodePath("../EnemyGoal")
enemy_path = NodePath("../Enemies")

[node name="AirSpawn" parent="." node_paths=PackedStringArray("flow_field", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -55.3737, 19.0055, 0)
leap_enemy_scene = ExtResource("20_ttr7n")
flow_field = NodePath("../FlowField2")
own_id = 5
type = 2
dest = NodePath("../EnemyGoal")
enemy_path = NodePath("../Enemies")

[node name="CardPrinter" parent="." instance=ExtResource("9_r25gu")]
transform = Transform3D(-0.779163, 0, -0.626821, 0, 1, 0, 0.626821, 0, -0.779163, 24.4653, 0.499996, 7.91386)

[node name="PlayerSpawnLocations" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 27.9469, 0, 0)

[node name="PlayerSpawn1" type="Node3D" parent="PlayerSpawnLocations"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1, -1)

[node name="PlayerSpawn2" type="Node3D" parent="PlayerSpawnLocations"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, -1)

[node name="PlayerSpawn3" type="Node3D" parent="PlayerSpawnLocations"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1, 1)

[node name="PlayerSpawn4" type="Node3D" parent="PlayerSpawnLocations"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1)

[node name="Towers" type="Node" parent="."]

[node name="Enemies" type="Node" parent="."]

[node name="Corpses" type="Node" parent="."]

[node name="ShopStand" parent="." instance=ExtResource("19_h6brl")]
transform = Transform3D(0.675552, 0, -0.737313, 0, 1, 0, 0.737313, 0, 0.675552, 27.7723, 0.5, -9.72493)

[node name="Killbox" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.77224, 0, 0)
collision_mask = 2
script = ExtResource("26_tuncf")

[node name="CollisionShape3D" type="CollisionShape3D" parent="Killbox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0668106, -6.8471, 0.829394)
shape = SubResource("BoxShape3D_134um")

[node name="Shredder" parent="." instance=ExtResource("27_gppb4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 25.9507, 0.5, 6.68838)

[node name="Vegetation" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.270391, 0)

[node name="Bushes" type="Node3D" parent="Vegetation"]
visible = false

[node name="Bush" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26.8009, 0.55, -0.714496)

[node name="Bush2" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.8697, 0.55, 7.03917)

[node name="Bush3" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -19.7036, 0.55, 15.4819)

[node name="Bush4" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25.0564, 0.550002, -17.205)

[node name="Bush5" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -32.453, 0.550006, -14.9963)

[node name="Bush6" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -32.7016, 0.550006, -9.91291)

[node name="Bush7" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -33.5845, 0.550006, 5.24479)

[node name="Bush8" parent="Vegetation/Bushes" instance=ExtResource("16_lhsvw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29.3475, 0.550006, 15.0865)

[node name="Trees" type="Node3D" parent="Vegetation"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 0)

[node name="Tree" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -34.4337, -0.55, -12.8538)

[node name="Tree2" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -40.2188, -0.55, -7.73946)

[node name="Tree3" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -39.6195, -0.55, 1.31349)

[node name="Tree4" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -37.821, -0.55, 12.3599)

[node name="Tree5" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -43.9121, -0.55, 6.97424)

[node name="Tree6" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -31.8846, -0.55, 16.0793)

[node name="Tree7" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25.9196, -0.55, 21.4348)

[node name="Tree8" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -33.4213, -0.550002, 23.5173)

[node name="Tree9" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -40.5929, -0.55, 20.0677)

[node name="Tree10" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -48.9603, -0.55, 15.7554)

[node name="Tree11" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -28.4525, -0.55, -15.0434)

[node name="Tree12" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -36.6707, -0.55, -8.92267)

[node name="Tree13" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -43.2351, -0.55, -3.67287)

[node name="Tree14" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -47.2184, -0.55, 1.58201)

[node name="Tree15" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -47.0707, -0.55, 11.6773)

[node name="Tree16" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -37.8069, -0.55, 6.34568)

[node name="Tree17" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.1055, 0.19536, -14.0826)

[node name="Tree18" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 27.3076, 0.19536, -16.2805)

[node name="Tree19" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 32.9281, 0.19536, -12.6261)

[node name="Tree20" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 35.05, 0.19536, -4.11496)

[node name="Tree21" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 32.6228, 0.19536, 4.37932)

[node name="Tree22" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 25.0298, 0.19536, 14.2435)

[node name="Tree23" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30.6311, 0.19536, 10.6459)

[node name="Tree24" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 38.9648, 0.19536, 4.04272)

[node name="Tree25" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 41.515, 0.19536, -2.69709)

[node name="Tree26" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 38.555, 0.19536, -9.52798)

[node name="Tree27" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 37.7353, 0.19536, 11.329)

[node name="Tree28" parent="Vegetation/Trees" instance=ExtResource("10_7v1co")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 31.2231, 0.19536, 18.1144)

[node name="bridge" parent="." instance=ExtResource("30_ttr7n")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 2.5, 0)

[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(-3.62805e-07, -8.3, -3.62805e-07, 0, -3.62805e-07, 8.3, -8.3, 3.62805e-07, 1.58587e-14, 2.93077, -74.4698, -10.0351)
layers = 4
texture = ExtResource("28_6od8s")

[node name="FlowField2" parent="." instance=ExtResource("24_sbix1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.215, 1.56, 0)

[node name="Node3D" parent="." instance=ExtResource("21_ks6qx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24.4581, 1.00142, -12.2655)

[connection signal="body_entered" from="EnemyGoal/Area3D" to="EnemyGoal" method="_on_area_3d_body_entered"]
[connection signal="body_entered" from="Killbox" to="Killbox" method="_on_body_entered"]
