[gd_scene load_steps=11 format=2]

[ext_resource path="res://src/classes/camera_guide.gd" type="Script" id=1]
[ext_resource path="res://src/Camera2D.gd" type="Script" id=2]
[ext_resource path="res://src/levels/TestBox.tscn" type="PackedScene" id=3]
[ext_resource path="res://src/ui/scene_transition.tscn" type="PackedScene" id=4]
[ext_resource path="res://src/ui/HUD.tscn" type="PackedScene" id=5]
[ext_resource path="res://src/Main.gd" type="Script" id=7]
[ext_resource path="res://src/ui/lobby.tscn" type="PackedScene" id=9]

[sub_resource type="Shader" id=2]
code = "shader_type canvas_item;

uniform vec2 cam_offset = vec2(0.0,0.0);

void vertex() {
	VERTEX += cam_offset;
}"

[sub_resource type="ShaderMaterial" id=3]
shader = SubResource( 2 )
shader_param/cam_offset = Vector2( 0, 0 )

[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 160, 90 )

[node name="Main" type="Node2D"]
script = ExtResource( 7 )
starting_level = ExtResource( 3 )
player_hud = ExtResource( 5 )

[node name="MusicPlayer" type="AudioStreamPlayer" parent="."]

[node name="ViewportContainer" type="ViewportContainer" parent="."]
material = SubResource( 3 )
margin_right = 322.0
margin_bottom = 182.0
rect_scale = Vector2( 2, 2 )

[node name="Viewport" type="Viewport" parent="ViewportContainer"]
unique_name_in_owner = true
size = Vector2( 320, 180 )
handle_input_locally = false
usage = 0
render_target_update_mode = 3

[node name="Lobby" parent="ViewportContainer/Viewport" instance=ExtResource( 9 )]
visible = false

[node name="SceneTransition" parent="ViewportContainer/Viewport" instance=ExtResource( 4 )]

[node name="Camera2D" type="Camera2D" parent="ViewportContainer/Viewport"]
unique_name_in_owner = true
position = Vector2( 160, 90 )
current = true
script = ExtResource( 2 )
tracking_node_path = NodePath("../CameraGuide")

[node name="CameraGuide" type="KinematicBody2D" parent="ViewportContainer/Viewport"]
unique_name_in_owner = true
position = Vector2( 160, 90 )
collision_layer = 0
collision_mask = 256
script = ExtResource( 1 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CameraGuide"]
visible = false
shape = SubResource( 4 )
one_way_collision = true
