[gd_scene load_steps=18 format=2]

[ext_resource path="res://Client.gd" type="Script" id=1]
[ext_resource path="res://Server.gd" type="Script" id=2]
[ext_resource path="res://Database.gd" type="Script" id=3]
[ext_resource path="res://ping.gd" type="Script" id=4]
[ext_resource path="res://Input.gd" type="Script" id=5]
[ext_resource path="res://spawner.gd" type="Script" id=6]
[ext_resource path="res://enemiessprite.gd" type="Script" id=7]
[ext_resource path="res://font/tiny.tres" type="DynamicFont" id=8]
[ext_resource path="res://Debug.tscn" type="PackedScene" id=9]
[ext_resource path="res://art/Untitledcxz.png" type="Texture" id=10]
[ext_resource path="res://Textures.gd" type="Script" id=11]

[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 10 )
region = Rect2( 0, 0, 112, 113 )

[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 10 )
region = Rect2( 112, 0, 112, 113 )

[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 10 )
region = Rect2( 224, 0, 112, 113 )

[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 10 )
region = Rect2( 336, 0, 112, 113 )

[sub_resource type="SpriteFrames" id=5]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
"loop": true,
"name": "default",
"speed": 5.0
} ]

[sub_resource type="GDScript" id=6]
script/source = "extends Node

var enabled = false

func _physics_process(delta):
	if enabled:
		var input = ''
		if Input.is_action_pressed(\"s\"):
			input =(\"ui_down\")
		if Input.is_action_pressed(\"w\"):
			input =(\"ui_up\")
		if Input.is_action_pressed(\"a\"):
			input =(\"ui_left\")
		if Input.is_action_pressed(\"d\"):
			input =(\"ui_right\")
		get_parent().send_input(input)
"

[node name="Node" type="Node"]

[node name="Textures" type="Node" parent="."]
script = ExtResource( 11 )

[node name="Goblin1" type="Viewport" parent="Textures"]
size = Vector2( 64, 64 )
own_world = true
transparent_bg = true
render_target_v_flip = true

[node name="Goblin" type="AnimatedSprite" parent="Textures/Goblin1"]
frames = SubResource( 5 )
playing = true
offset = Vector2( 32, 32 )

[node name="Goblin2" type="Viewport" parent="Textures"]
size = Vector2( 64, 64 )
own_world = true
transparent_bg = true
render_target_v_flip = true

[node name="Goblin" type="AnimatedSprite" parent="Textures/Goblin2"]
frames = SubResource( 5 )
speed_scale = 0.8
playing = true
offset = Vector2( 32, 32 )

[node name="Goblin3" type="Viewport" parent="Textures"]
size = Vector2( 64, 64 )
own_world = true
transparent_bg = true
render_target_v_flip = true

[node name="Goblin" type="AnimatedSprite" parent="Textures/Goblin3"]
frames = SubResource( 5 )
frame = 2
speed_scale = 1.2
playing = true
offset = Vector2( 32, 32 )

[node name="Goblin4" type="Viewport" parent="Textures"]
size = Vector2( 64, 64 )
own_world = true
transparent_bg = true
render_target_v_flip = true

[node name="Goblin" type="AnimatedSprite" parent="Textures/Goblin4"]
frames = SubResource( 5 )
speed_scale = 0.9
playing = true
offset = Vector2( 32, 32 )

[node name="Server" type="Node" parent="."]
script = ExtResource( 2 )
database = NodePath("../Database")
tickrate = 4

[node name="players" type="Node" parent="Server"]

[node name="enemies" type="Node" parent="Server"]
script = ExtResource( 6 )
wave_num = 8
spawn_speed = 1
limit = 256

[node name="dmgbox" type="Node" parent="Server"]

[node name="Client" type="Node" parent="." groups=[
"client",
]]
script = ExtResource( 1 )

[node name="ping" type="Label" parent="Client"]
margin_left = 12.1612
margin_top = 260.304
margin_right = 52.1612
margin_bottom = 281.304
custom_fonts/font = ExtResource( 8 )
text = "ping..."
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Input" type="Node" parent="Client"]
script = ExtResource( 5 )

[node name="players" type="Node" parent="Client"]

[node name="enemies" type="Node" parent="Client"]
script = ExtResource( 7 )

[node name="Debug" parent="Client" instance=ExtResource( 9 )]

[node name="Hud" type="CanvasLayer" parent="Client"]

[node name="HBoxContainer" type="HBoxContainer" parent="Client/Hud"]
anchor_right = 1.0
margin_right = 1.0
margin_bottom = 60.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Client2" type="Node" parent="." groups=[
"client",
]]
script = ExtResource( 1 )

[node name="Input" type="Node" parent="Client2"]
script = SubResource( 6 )

[node name="Database" type="Node" parent="."]
script = ExtResource( 3 )

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

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