NAVIGATION

This commit is contained in:
Daniel Flanagan 2021-12-21 16:40:58 -06:00
parent 4849ba9c20
commit d02fe3256d
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
15 changed files with 383 additions and 110 deletions

View file

@ -1,10 +1,167 @@
[gd_resource type="Theme" load_steps=9 format=2]
[gd_resource type="Theme" load_steps=25 format=2]
[ext_resource path="res://assets/fonts/iosevkalyte/iosevkalyte.tres" type="DynamicFont" id=1]
[ext_resource path="res://assets/img/panel.png" type="Texture" id=2]
[ext_resource path="res://assets/ui/progressbar_stylebox.tres" type="StyleBox" id=3]
[sub_resource type="Image" id=7]
[sub_resource type="Image" id=23]
data = {
"data": PoolByteArray( 0, 4, 0, 10, 0, 17, 0, 25, 0, 31, 0, 34, 0, 36, 0, 36, 0, 36, 0, 36, 0, 34, 0, 31, 0, 25, 0, 17, 0, 10, 0, 4, 0, 10, 0, 21, 0, 37, 0, 52, 0, 63, 0, 70, 0, 71, 0, 72, 0, 72, 0, 71, 0, 70, 0, 63, 0, 52, 0, 37, 0, 21, 0, 10, 0, 17, 0, 37, 63, 119, 90, 239, 86, 255, 86, 255, 86, 255, 86, 255, 86, 255, 86, 255, 86, 255, 86, 255, 90, 239, 63, 119, 0, 37, 0, 17, 0, 25, 0, 52, 89, 239, 72, 255, 68, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 68, 255, 72, 255, 89, 239, 0, 52, 0, 25, 0, 31, 0, 63, 84, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 67, 255, 84, 255, 0, 63, 0, 31, 0, 34, 0, 70, 82, 255, 66, 255, 66, 255, 66, 255, 66, 255, 66, 255, 66, 255, 66, 255, 66, 255, 66, 255, 66, 255, 82, 255, 0, 70, 0, 34, 0, 36, 0, 71, 81, 255, 64, 255, 64, 255, 64, 255, 64, 255, 64, 255, 64, 255, 64, 255, 64, 255, 64, 255, 64, 255, 81, 255, 0, 71, 0, 36, 0, 36, 0, 72, 79, 255, 63, 255, 63, 255, 63, 255, 63, 255, 63, 255, 63, 255, 63, 255, 63, 255, 63, 255, 63, 255, 79, 255, 0, 72, 0, 36, 0, 36, 0, 72, 77, 255, 62, 255, 62, 255, 62, 255, 62, 255, 62, 255, 62, 255, 62, 255, 62, 255, 62, 255, 62, 255, 77, 255, 0, 72, 0, 36, 0, 36, 0, 71, 76, 255, 61, 255, 61, 255, 61, 255, 61, 255, 61, 255, 61, 255, 61, 255, 61, 255, 61, 255, 61, 255, 76, 255, 0, 71, 0, 36, 0, 34, 0, 70, 74, 255, 59, 255, 59, 255, 59, 255, 59, 255, 59, 255, 59, 255, 59, 255, 59, 255, 59, 255, 59, 255, 74, 255, 0, 70, 0, 34, 0, 31, 0, 63, 73, 255, 58, 255, 58, 255, 58, 255, 58, 255, 58, 255, 58, 255, 58, 255, 58, 255, 58, 255, 58, 255, 73, 255, 0, 63, 0, 31, 0, 25, 0, 52, 75, 239, 61, 255, 57, 255, 57, 255, 57, 255, 57, 255, 57, 255, 57, 255, 57, 255, 57, 255, 61, 255, 75, 239, 0, 52, 0, 25, 0, 17, 0, 37, 53, 119, 74, 239, 71, 255, 70, 255, 70, 255, 70, 255, 70, 255, 70, 255, 70, 255, 71, 255, 74, 237, 53, 119, 0, 37, 0, 17, 0, 10, 0, 21, 0, 37, 0, 52, 0, 63, 0, 70, 0, 71, 0, 72, 0, 72, 0, 71, 0, 70, 0, 63, 0, 52, 0, 37, 0, 21, 0, 10, 0, 4, 0, 10, 0, 17, 0, 25, 0, 31, 0, 34, 0, 36, 0, 36, 0, 36, 0, 36, 0, 34, 0, 31, 0, 25, 0, 17, 0, 10, 0, 4 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=8]
flags = 4
flags = 4
image = SubResource( 23 )
size = Vector2( 16, 16 )
[sub_resource type="StyleBoxTexture" id=9]
content_margin_left = 6.0
content_margin_right = 6.0
content_margin_top = 2.0
content_margin_bottom = 2.0
texture = SubResource( 8 )
region_rect = Rect2( 0, 0, 16, 16 )
margin_left = 4.0
margin_right = 4.0
margin_top = 4.0
margin_bottom = 4.0
expand_margin_left = 2.0
expand_margin_right = 2.0
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="Image" id=24]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 14, 71, 140, 191, 57, 71, 140, 191, 104, 71, 140, 191, 122, 71, 140, 191, 123, 71, 140, 191, 123, 71, 140, 191, 123, 71, 140, 191, 123, 71, 140, 191, 122, 71, 140, 191, 104, 71, 140, 191, 57, 71, 140, 191, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 58, 71, 140, 191, 116, 71, 140, 191, 16, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 16, 71, 140, 191, 116, 71, 140, 191, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 105, 71, 140, 191, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 15, 71, 140, 191, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 123, 71, 140, 191, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 6, 71, 140, 191, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 123, 71, 140, 191, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 8, 71, 140, 191, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 123, 71, 140, 191, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 8, 71, 140, 191, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 123, 71, 140, 191, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 8, 71, 140, 191, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 123, 71, 140, 191, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 8, 71, 140, 191, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 123, 71, 140, 191, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 6, 71, 140, 191, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 105, 71, 140, 191, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 14, 71, 140, 191, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 58, 71, 140, 191, 117, 71, 140, 191, 15, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 8, 71, 140, 191, 17, 71, 140, 191, 116, 71, 140, 191, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 140, 191, 14, 71, 140, 191, 58, 71, 140, 191, 104, 71, 140, 191, 122, 71, 140, 191, 123, 71, 140, 191, 123, 71, 140, 191, 123, 71, 140, 191, 123, 71, 140, 191, 122, 71, 140, 191, 104, 71, 140, 191, 57, 71, 140, 191, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=11]
flags = 4
flags = 4
image = SubResource( 24 )
size = Vector2( 16, 16 )
[sub_resource type="StyleBoxTexture" id=12]
content_margin_left = 6.0
content_margin_right = 6.0
content_margin_top = 2.0
content_margin_bottom = 2.0
texture = SubResource( 11 )
region_rect = Rect2( 0, 0, 16, 16 )
margin_left = 4.0
margin_right = 4.0
margin_top = 4.0
margin_bottom = 4.0
expand_margin_left = 2.0
expand_margin_right = 2.0
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="Image" id=25]
data = {
"data": PoolByteArray( 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 21, 0, 0, 0, 37, 0, 0, 0, 52, 0, 0, 0, 63, 0, 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 71, 0, 0, 0, 70, 0, 0, 0, 63, 0, 0, 0, 52, 0, 0, 0, 37, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 37, 66, 64, 75, 119, 95, 90, 108, 239, 91, 87, 104, 255, 90, 86, 103, 255, 90, 86, 103, 255, 90, 86, 103, 255, 90, 86, 103, 255, 90, 86, 103, 255, 90, 86, 103, 255, 91, 87, 104, 255, 95, 90, 108, 239, 66, 64, 75, 119, 0, 0, 0, 37, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 52, 95, 90, 107, 239, 77, 74, 87, 255, 73, 70, 82, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 73, 70, 82, 255, 77, 74, 87, 255, 95, 90, 107, 239, 0, 0, 0, 52, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 63, 91, 87, 102, 255, 73, 70, 82, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 72, 69, 81, 255, 73, 70, 82, 255, 91, 87, 102, 255, 0, 0, 0, 63, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 70, 89, 85, 100, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 71, 68, 80, 255, 89, 85, 100, 255, 0, 0, 0, 70, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 71, 88, 84, 100, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 70, 67, 80, 255, 88, 84, 100, 255, 0, 0, 0, 71, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 72, 86, 83, 99, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 69, 66, 79, 255, 86, 83, 99, 255, 0, 0, 0, 72, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 72, 86, 83, 98, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 69, 66, 78, 255, 86, 83, 98, 255, 0, 0, 0, 72, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 71, 85, 81, 98, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 68, 65, 78, 255, 85, 81, 98, 255, 0, 0, 0, 71, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 70, 85, 81, 96, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 68, 65, 77, 255, 85, 81, 96, 255, 0, 0, 0, 70, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 63, 85, 81, 96, 255, 68, 65, 77, 255, 67, 64, 76, 255, 67, 64, 76, 255, 67, 64, 76, 255, 67, 64, 76, 255, 67, 64, 76, 255, 67, 64, 76, 255, 67, 64, 76, 255, 67, 64, 76, 255, 68, 65, 77, 255, 85, 81, 96, 255, 0, 0, 0, 63, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 52, 86, 83, 100, 239, 71, 67, 81, 255, 67, 63, 77, 255, 66, 63, 76, 255, 66, 63, 76, 255, 66, 63, 76, 255, 66, 63, 76, 255, 66, 63, 76, 255, 66, 63, 76, 255, 67, 63, 77, 255, 71, 67, 81, 255, 87, 83, 100, 239, 0, 0, 0, 52, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 37, 62, 59, 70, 119, 87, 83, 99, 239, 83, 80, 95, 255, 83, 79, 94, 255, 83, 79, 94, 255, 83, 79, 94, 255, 83, 79, 94, 255, 83, 79, 94, 255, 83, 79, 94, 255, 83, 80, 95, 255, 87, 83, 99, 237, 62, 59, 70, 119, 0, 0, 0, 37, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 21, 0, 0, 0, 37, 0, 0, 0, 52, 0, 0, 0, 63, 0, 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 71, 0, 0, 0, 70, 0, 0, 0, 63, 0, 0, 0, 52, 0, 0, 0, 37, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 4 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=14]
flags = 4
flags = 4
image = SubResource( 25 )
size = Vector2( 16, 16 )
[sub_resource type="StyleBoxTexture" id=15]
content_margin_left = 6.0
content_margin_right = 6.0
content_margin_top = 2.0
content_margin_bottom = 2.0
texture = SubResource( 14 )
region_rect = Rect2( 0, 0, 16, 16 )
margin_left = 4.0
margin_right = 4.0
margin_top = 4.0
margin_bottom = 4.0
expand_margin_left = 2.0
expand_margin_right = 2.0
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="Image" id=26]
data = {
"data": PoolByteArray( 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 21, 0, 0, 0, 37, 0, 0, 0, 52, 0, 0, 0, 63, 0, 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 71, 0, 0, 0, 70, 0, 0, 0, 63, 0, 0, 0, 52, 0, 0, 0, 37, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 37, 60, 58, 68, 119, 86, 83, 97, 239, 82, 80, 93, 255, 81, 79, 93, 255, 81, 79, 93, 255, 81, 79, 93, 255, 81, 79, 93, 255, 81, 79, 93, 255, 81, 79, 93, 255, 82, 80, 93, 255, 86, 83, 97, 239, 60, 58, 68, 119, 0, 0, 0, 37, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 52, 86, 82, 96, 239, 70, 66, 78, 255, 66, 62, 74, 255, 65, 62, 73, 255, 65, 62, 73, 255, 65, 62, 73, 255, 65, 62, 73, 255, 65, 62, 73, 255, 65, 62, 73, 255, 66, 62, 74, 255, 70, 66, 78, 255, 86, 82, 96, 239, 0, 0, 0, 52, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 63, 81, 78, 91, 255, 65, 62, 73, 255, 64, 62, 72, 255, 64, 62, 72, 255, 64, 62, 72, 255, 64, 62, 72, 255, 64, 62, 72, 255, 64, 62, 72, 255, 64, 62, 72, 255, 64, 62, 72, 255, 65, 62, 73, 255, 81, 78, 91, 255, 0, 0, 0, 63, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 70, 79, 76, 89, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 63, 61, 71, 255, 79, 76, 89, 255, 0, 0, 0, 70, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 71, 78, 74, 88, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 62, 59, 70, 255, 78, 74, 88, 255, 0, 0, 0, 71, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 72, 75, 73, 85, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 60, 58, 68, 255, 75, 73, 85, 255, 0, 0, 0, 72, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 72, 74, 71, 84, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 59, 57, 67, 255, 74, 71, 84, 255, 0, 0, 0, 72, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 71, 73, 70, 83, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 58, 56, 66, 255, 73, 70, 83, 255, 0, 0, 0, 71, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 70, 71, 69, 80, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 57, 55, 64, 255, 71, 69, 80, 255, 0, 0, 0, 70, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 63, 71, 67, 80, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 56, 53, 63, 255, 71, 67, 80, 255, 0, 0, 0, 63, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 52, 71, 68, 82, 239, 58, 56, 66, 255, 54, 52, 62, 255, 54, 52, 62, 255, 54, 52, 62, 255, 54, 52, 62, 255, 54, 52, 62, 255, 54, 52, 62, 255, 54, 52, 62, 255, 54, 52, 62, 255, 58, 56, 66, 255, 71, 68, 82, 239, 0, 0, 0, 52, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 37, 51, 49, 57, 119, 71, 68, 80, 239, 68, 66, 77, 255, 68, 65, 76, 255, 68, 65, 76, 255, 68, 65, 76, 255, 68, 65, 76, 255, 68, 65, 76, 255, 68, 65, 76, 255, 68, 66, 77, 255, 71, 68, 81, 237, 51, 49, 57, 119, 0, 0, 0, 37, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 21, 0, 0, 0, 37, 0, 0, 0, 52, 0, 0, 0, 63, 0, 0, 0, 70, 0, 0, 0, 71, 0, 0, 0, 72, 0, 0, 0, 72, 0, 0, 0, 71, 0, 0, 0, 70, 0, 0, 0, 63, 0, 0, 0, 52, 0, 0, 0, 37, 0, 0, 0, 21, 0, 0, 0, 10, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 4 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=17]
flags = 4
flags = 4
image = SubResource( 26 )
size = Vector2( 16, 16 )
[sub_resource type="StyleBoxTexture" id=18]
content_margin_left = 6.0
content_margin_right = 6.0
content_margin_top = 3.0
content_margin_bottom = 3.0
texture = SubResource( 17 )
region_rect = Rect2( 0, 0, 16, 16 )
margin_left = 4.0
margin_right = 4.0
margin_top = 4.0
margin_bottom = 4.0
expand_margin_left = 2.0
expand_margin_right = 2.0
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="Image" id=27]
data = {
"data": PoolByteArray( 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 17, 0, 0, 0, 25, 0, 0, 0, 31, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 36, 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 25, 0, 0, 0, 17, 0, 0, 0, 10, 0, 0, 0, 4, 0, 0, 0, 11, 0, 0, 0, 22, 0, 0, 0, 39, 0, 0, 0, 54, 0, 0, 0, 65, 0, 0, 0, 73, 0, 0, 0, 74, 0, 0, 0, 75, 0, 0, 0, 75, 0, 0, 0, 74, 0, 0, 0, 73, 0, 0, 0, 65, 0, 0, 0, 54, 0, 0, 0, 39, 0, 0, 0, 22, 0, 0, 0, 11, 0, 0, 0, 19, 0, 0, 0, 41, 49, 47, 55, 128, 70, 67, 79, 241, 67, 64, 76, 255, 66, 64, 75, 255, 66, 64, 75, 255, 66, 64, 75, 255, 66, 64, 75, 255, 66, 64, 75, 255, 66, 64, 75, 255, 67, 64, 76, 255, 70, 67, 79, 241, 49, 47, 55, 127, 0, 0, 0, 41, 0, 0, 0, 19, 0, 0, 0, 30, 0, 0, 0, 61, 71, 68, 80, 242, 58, 56, 65, 255, 11, 11, 12, 255, 11, 10, 12, 255, 11, 10, 12, 255, 11, 10, 12, 255, 11, 10, 12, 255, 11, 11, 12, 255, 11, 11, 12, 255, 11, 11, 12, 255, 58, 56, 65, 255, 71, 68, 80, 242, 0, 0, 0, 61, 0, 0, 0, 30, 0, 0, 0, 39, 0, 0, 0, 77, 68, 66, 78, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 15, 14, 17, 255, 68, 66, 78, 255, 0, 0, 0, 77, 0, 0, 0, 39, 0, 0, 0, 44, 0, 0, 0, 88, 70, 66, 79, 255, 20, 19, 22, 255, 19, 18, 22, 255, 19, 18, 22, 255, 20, 19, 22, 255, 19, 18, 22, 255, 20, 19, 22, 255, 20, 19, 22, 255, 20, 19, 22, 255, 20, 19, 22, 255, 19, 18, 22, 255, 70, 66, 79, 255, 0, 0, 0, 88, 0, 0, 0, 44, 0, 0, 0, 50, 0, 0, 0, 93, 71, 69, 80, 255, 24, 23, 27, 255, 24, 23, 27, 255, 24, 23, 27, 255, 24, 23, 27, 255, 24, 23, 27, 255, 24, 23, 27, 255, 24, 23, 27, 255, 25, 24, 28, 255, 24, 23, 27, 255, 24, 23, 27, 255, 71, 69, 80, 255, 0, 0, 0, 93, 0, 0, 0, 50, 0, 0, 0, 51, 0, 0, 0, 99, 73, 70, 83, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 29, 28, 33, 255, 73, 70, 83, 255, 0, 0, 0, 99, 0, 0, 0, 51, 0, 0, 0, 54, 0, 0, 0, 102, 74, 71, 84, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 34, 33, 39, 255, 74, 71, 84, 255, 0, 0, 0, 102, 0, 0, 0, 54, 0, 0, 0, 57, 0, 0, 0, 105, 75, 73, 85, 255, 39, 38, 45, 255, 39, 38, 45, 255, 39, 38, 45, 255, 39, 38, 45, 255, 39, 38, 45, 255, 39, 38, 45, 255, 39, 38, 45, 255, 40, 38, 45, 255, 39, 38, 45, 255, 40, 38, 45, 255, 75, 73, 85, 255, 0, 0, 0, 105, 0, 0, 0, 57, 0, 0, 0, 56, 0, 0, 0, 108, 78, 74, 88, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 45, 43, 51, 255, 78, 74, 88, 255, 0, 0, 0, 108, 0, 0, 0, 56, 0, 0, 0, 53, 0, 0, 0, 101, 80, 77, 90, 255, 51, 49, 58, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 57, 255, 51, 49, 58, 255, 80, 77, 90, 255, 0, 0, 0, 101, 0, 0, 0, 53, 0, 0, 0, 45, 0, 0, 0, 89, 85, 82, 95, 252, 69, 66, 77, 255, 57, 55, 64, 255, 56, 55, 64, 255, 57, 55, 64, 255, 56, 55, 64, 255, 56, 55, 64, 255, 56, 55, 64, 255, 56, 55, 64, 255, 58, 55, 65, 255, 69, 66, 77, 255, 85, 82, 96, 252, 0, 0, 0, 89, 0, 0, 0, 45, 0, 0, 0, 32, 0, 0, 0, 68, 61, 58, 69, 180, 86, 82, 96, 253, 82, 78, 92, 255, 81, 78, 91, 255, 81, 78, 91, 255, 81, 78, 91, 255, 81, 78, 91, 255, 81, 78, 91, 255, 81, 78, 91, 255, 82, 78, 92, 255, 86, 82, 96, 253, 61, 58, 69, 180, 0, 0, 0, 68, 0, 0, 0, 32, 0, 0, 0, 20, 0, 0, 0, 40, 0, 0, 0, 69, 0, 0, 0, 93, 0, 0, 0, 110, 0, 0, 0, 121, 0, 0, 0, 122, 0, 0, 0, 124, 0, 0, 0, 124, 0, 0, 0, 122, 0, 0, 0, 121, 0, 0, 0, 110, 0, 0, 0, 93, 0, 0, 0, 69, 0, 0, 0, 40, 0, 0, 0, 20, 0, 0, 0, 8, 0, 0, 0, 20, 0, 0, 0, 33, 0, 0, 0, 48, 0, 0, 0, 58, 0, 0, 0, 63, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 63, 0, 0, 0, 58, 0, 0, 0, 48, 0, 0, 0, 33, 0, 0, 0, 20, 0, 0, 0, 8 ),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=20]
flags = 4
flags = 4
image = SubResource( 27 )
size = Vector2( 16, 16 )
[sub_resource type="StyleBoxTexture" id=21]
content_margin_left = 6.0
content_margin_right = 6.0
content_margin_top = 3.0
content_margin_bottom = 3.0
texture = SubResource( 20 )
region_rect = Rect2( 0, 0, 16, 16 )
margin_left = 4.0
margin_right = 4.0
margin_top = 4.0
margin_bottom = 4.0
expand_margin_left = 2.0
expand_margin_right = 2.0
expand_margin_top = 2.0
expand_margin_bottom = 2.0
[sub_resource type="StyleBoxEmpty" id=22]
[sub_resource type="Image" id=28]
data = {
"data": PoolByteArray( 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42, 37, 37, 42 ),
"format": "RGB8",
@ -16,7 +173,7 @@ data = {
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 7 )
image = SubResource( 28 )
size = Vector2( 8, 8 )
[sub_resource type="StyleBoxTexture" id=3]
@ -43,6 +200,27 @@ corner_radius_bottom_left = 1
[resource]
default_font = ExtResource( 1 )
Button/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
Button/colors/font_color_disabled = Color( 0.533333, 0.533333, 0.533333, 1 )
Button/colors/font_color_focus = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 )
Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
Button/constants/hseparation = 2
Button/fonts/font = ExtResource( 1 )
Button/styles/disabled = SubResource( 9 )
Button/styles/focus = SubResource( 12 )
Button/styles/hover = SubResource( 15 )
Button/styles/normal = SubResource( 18 )
Button/styles/pressed = SubResource( 21 )
Label/colors/font_color = Color( 1, 1, 1, 1 )
Label/colors/font_color_shadow = Color( 0, 0, 0, 0 )
Label/colors/font_outline_modulate = Color( 1, 1, 1, 1 )
Label/constants/line_spacing = 3
Label/constants/shadow_as_outline = 0
Label/constants/shadow_offset_x = 1
Label/constants/shadow_offset_y = 1
Label/fonts/font = ExtResource( 1 )
Label/styles/normal = SubResource( 22 )
Panel/styles/panel = SubResource( 3 )
PanelContainer/styles/panel = SubResource( 4 )
ProgressBar/styles/bg = ExtResource( 3 )

View file

@ -14,7 +14,7 @@ __meta__ = {
[node name="TextureRect" type="TextureRect" parent="."]
margin_right = 24.0
margin_bottom = 600.0
margin_bottom = 720.0
rect_min_size = Vector2( 24, 24 )
size_flags_vertical = 11
texture = ExtResource( 2 )
@ -23,9 +23,16 @@ stretch_mode = 6
[node name="Label" type="Label" parent="."]
margin_left = 28.0
margin_right = 1024.0
margin_bottom = 600.0
margin_right = 1280.0
margin_bottom = 720.0
size_flags_horizontal = 3
size_flags_vertical = 11
text = "Lobby Name"
valign = 1
[node name="Button" type="Button" parent="."]
visible = false
margin_left = 1242.0
margin_right = 1280.0
margin_bottom = 720.0
text = "Kick"

View file

@ -70,21 +70,36 @@ collider = NodePath("collider")
name_label = NodePath("ui/player_name")
health_bar = NodePath("ui/c2/bars/health_bar")
mana_bar = NodePath("ui/c2/bars/mana_bar")
aim_indicator = NodePath("collider/aim_indicator")
tile_indicator = NodePath("collider/tile_indicator")
[node name="sprite" type="AnimatedSprite" parent="."]
modulate = Color( 0.384314, 0.796078, 1, 1 )
position = Vector2( 0, -9 )
position = Vector2( 0, -48 )
scale = Vector2( 4, 4 )
frames = SubResource( 10 )
animation = "idle"
frame = 1
frame = 3
playing = true
[node name="collider" type="CollisionPolygon2D" parent="."]
position = Vector2( 0, 39 )
scale = Vector2( 4, 4 )
polygon = PoolVector2Array( 6, -1, 6, 1, 1, 6, -1, 6, -6, 1, -6, -1, -1, -6, 1, -6 )
[node name="aim_indicator" type="Sprite" parent="collider"]
modulate = Color( 1, 1, 1, 0.25098 )
texture = ExtResource( 1 )
offset = Vector2( 0, 16 )
region_enabled = true
region_rect = Rect2( 163, 487, 4, 7 )
[node name="tile_indicator" type="Sprite" parent="collider"]
modulate = Color( 1, 1, 1, 0.25098 )
scale = Vector2( 2, 2 )
texture = ExtResource( 1 )
region_enabled = true
region_rect = Rect2( 0, 72, 16, 16 )
[node name="ui" type="VBoxContainer" parent="."]
modulate = Color( 1, 1, 1, 0.498039 )
anchor_left = 0.5
@ -92,9 +107,9 @@ anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -59.0
margin_top = -70.0
margin_top = -116.0
margin_right = 61.0
margin_bottom = 101.0
margin_bottom = 55.0
grow_horizontal = 2
grow_vertical = 2
__meta__ = {

View file

@ -4,33 +4,33 @@
[ext_resource path="res://scripts/objects/slime.gd" type="Script" id=2]
[ext_resource path="res://scripts/objects/destructable.gd" type="Script" id=3]
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 0, 432, 16, 36 )
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 432, 18, 36 )
region = Rect2( 0, 432, 16, 36 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 18, 432, 18, 36 )
region = Rect2( 18, 432, 16, 36 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 36, 432, 18, 36 )
region = Rect2( 36, 432, 16, 36 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 54, 432, 18, 36 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 0, 432, 18, 36 )
region = Rect2( 54, 432, 16, 36 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 0, 432, 18, 36 )
region = Rect2( 0, 432, 16, 36 )
[sub_resource type="SpriteFrames" id=7]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"frames": [ SubResource( 5 ), SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 6 ) ],
"loop": true,
"name": "idle",
"speed": 6.0
@ -38,7 +38,7 @@ animations = [ {
[sub_resource type="CapsuleShape2D" id=8]
radius = 6.0
height = 1.0
height = 0.0
[node name="slime" type="KinematicBody2D"]
scale = Vector2( 2, 2 )
@ -48,14 +48,16 @@ script = ExtResource( 2 )
scale = Vector2( 4, 4 )
frames = SubResource( 7 )
animation = "idle"
frame = 3
frame = 1
playing = true
offset = Vector2( 1, -17 )
offset = Vector2( 1, -11 )
[node name="hurtbox" type="CollisionShape2D" parent="."]
position = Vector2( 0, -26 )
scale = Vector2( 4, 4 )
shape = SubResource( 8 )
script = ExtResource( 3 )
[node name="nav_line" type="Line2D" parent="."]
points = PoolVector2Array( 0, 30, 30, 30, 0, 0 )
[connection signal="die" from="hurtbox" to="." method="_on_hurtbox_die"]

View file

@ -23,11 +23,17 @@ _global_script_classes=[ {
"class": "PeerControl",
"language": "GDScript",
"path": "res://scripts/objects/peer.gd"
}, {
"base": "KinematicBody2D",
"class": "Slime",
"language": "GDScript",
"path": "res://scripts/objects/slime.gd"
} ]
_global_script_class_icons={
"Destructable": "",
"LobbyControl": "",
"PeerControl": ""
"PeerControl": "",
"Slime": ""
}
[application]

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,6 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://assets/fonts/iosevkalyte/iosevkalyte-regular.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://assets/img/cross.png" type="Texture" id=2]
[ext_resource path="res://scripts/screens/main_menu.gd" type="Script" id=3]
[ext_resource path="res://assets/theme.tres" type="Theme" id=4]
@ -39,7 +38,6 @@ hint_tooltip = "Yeah, let's get out of here."
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Quit"
icon = ExtResource( 2 )
expand_icon = true
__meta__ = {
"_edit_use_anchors_": false

View file

@ -17,11 +17,11 @@ __meta__ = {
}
[node name="v" type="VBoxContainer" parent="."]
margin_right = 984.0
margin_bottom = 560.0
margin_right = 1240.0
margin_bottom = 680.0
[node name="head" type="HBoxContainer" parent="v"]
margin_right = 984.0
margin_right = 1240.0
margin_bottom = 50.0
[node name="leave_button" type="Button" parent="v/head"]
@ -37,7 +37,7 @@ __meta__ = {
[node name="lobby_info" type="LineEdit" parent="v/head"]
margin_left = 154.0
margin_top = 9.0
margin_right = 356.0
margin_right = 616.0
margin_bottom = 40.0
size_flags_horizontal = 3
size_flags_vertical = 4
@ -45,37 +45,37 @@ text = "Lobby Info"
placeholder_text = "Lobby Name"
[node name="l1" type="Label" parent="v/head"]
margin_left = 360.0
margin_left = 620.0
margin_top = 14.0
margin_right = 464.0
margin_right = 724.0
margin_bottom = 35.0
text = " Max Players:"
[node name="max_players" type="LineEdit" parent="v/head"]
margin_left = 468.0
margin_left = 728.0
margin_top = 9.0
margin_right = 574.0
margin_right = 834.0
margin_bottom = 40.0
size_flags_vertical = 4
text = "20"
[node name="lock" type="CheckButton" parent="v/head"]
margin_left = 578.0
margin_right = 706.0
margin_left = 838.0
margin_right = 964.0
margin_bottom = 50.0
hint_tooltip = "Prevent players from joining to minimize \"Ready Up\" trolling"
text = "Locked"
[node name="start" type="Button" parent="v/head"]
margin_left = 710.0
margin_right = 860.0
margin_left = 968.0
margin_right = 1118.0
margin_bottom = 50.0
rect_min_size = Vector2( 150, 0 )
text = "Start Game"
[node name="ready_up" type="CheckButton" parent="v/head"]
margin_left = 864.0
margin_right = 984.0
margin_left = 1122.0
margin_right = 1240.0
margin_bottom = 50.0
text = "Ready"
__meta__ = {
@ -84,14 +84,14 @@ __meta__ = {
[node name="body" type="HBoxContainer" parent="v"]
margin_top = 54.0
margin_right = 984.0
margin_bottom = 560.0
margin_right = 1240.0
margin_bottom = 680.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="peers" type="VBoxContainer" parent="v/body"]
margin_right = 194.0
margin_bottom = 506.0
margin_bottom = 626.0
[node name="label" type="Label" parent="v/body/peers"]
margin_right = 194.0
@ -105,7 +105,7 @@ __meta__ = {
[node name="p" type="PanelContainer" parent="v/body/peers"]
margin_top = 25.0
margin_right = 194.0
margin_bottom = 506.0
margin_bottom = 626.0
size_flags_horizontal = 3
size_flags_vertical = 3
@ -113,44 +113,44 @@ size_flags_vertical = 3
margin_left = 7.0
margin_top = 7.0
margin_right = 187.0
margin_bottom = 474.0
margin_bottom = 594.0
rect_min_size = Vector2( 180, 0 )
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="v" type="VBoxContainer" parent="v/body"]
margin_left = 198.0
margin_right = 984.0
margin_bottom = 506.0
margin_right = 1240.0
margin_bottom = 626.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="chat_head" type="HBoxContainer" parent="v/body/v"]
margin_right = 786.0
margin_bottom = 40.0
margin_right = 1042.0
margin_bottom = 38.0
size_flags_horizontal = 3
[node name="label" type="Label" parent="v/body/v/chat_head"]
margin_right = 614.0
margin_bottom = 40.0
margin_right = 872.0
margin_bottom = 38.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "Chat"
valign = 2
[node name="auto_scroll" type="CheckButton" parent="v/body/v/chat_head"]
margin_left = 618.0
margin_right = 786.0
margin_bottom = 40.0
margin_left = 876.0
margin_right = 1042.0
margin_bottom = 38.0
size_flags_horizontal = 12
size_flags_vertical = 12
pressed = true
text = "Auto Scroll"
[node name="messages" type="TextEdit" parent="v/body/v"]
margin_top = 44.0
margin_right = 786.0
margin_bottom = 471.0
margin_top = 42.0
margin_right = 1042.0
margin_bottom = 591.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "# Connecting..."
@ -161,15 +161,15 @@ virtual_keyboard_enabled = false
caret_block_mode = true
[node name="h" type="HBoxContainer" parent="v/body/v"]
margin_top = 475.0
margin_right = 786.0
margin_bottom = 506.0
margin_top = 595.0
margin_right = 1042.0
margin_bottom = 626.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="chat" type="LineEdit" parent="v/body/v/h"]
margin_right = 674.0
margin_right = 930.0
margin_bottom = 31.0
size_flags_horizontal = 3
size_flags_vertical = 3
@ -177,14 +177,15 @@ clear_button_enabled = true
placeholder_text = "Compose a chat message here, press Enter to send"
[node name="send" type="Button" parent="v/body/v/h"]
margin_left = 678.0
margin_right = 786.0
margin_left = 934.0
margin_right = 1042.0
margin_bottom = 31.0
size_flags_vertical = 3
text = "Send Message"
[connection signal="pressed" from="v/head/leave_button" to="." method="_on_leave_button_pressed"]
[connection signal="text_changed" from="v/head/lobby_info" to="." method="_on_lobby_info_text_changed"]
[connection signal="text_changed" from="v/head/max_players" to="." method="_on_max_players_text_changed"]
[connection signal="pressed" from="v/head/start" to="." method="_on_start_pressed"]
[connection signal="toggled" from="v/head/ready_up" to="." method="_on_ready_up_toggled"]
[connection signal="text_entered" from="v/body/v/h/chat" to="." method="_on_TextEdit_text_entered"]

View file

@ -12,7 +12,6 @@ onready var onetime_cmd_flags = {
}
func _ready():
get_tree().use_font_oversampling = true
add_child(client)
for flag in onetime_cmd_flags.keys():
if flag in OS.get_cmdline_args():

View file

@ -169,15 +169,15 @@ func _signaller_connected(protocol = ""):
func _process(_delta: float):
if webrtc:
webrtc.poll()
while webrtc.get_available_packet_count() > 0:
print("WebRTC Packet: %s" % webrtc.get_packet().get_string_from_utf8())
# while webrtc.get_available_packet_count() > 0:
# print("WebRTC Packet: %s" % webrtc.get_packet().get_string_from_utf8())
var status: int = websocket.get_connection_status()
if status in [WebSocketClient.CONNECTION_CONNECTED, WebSocketClient.CONNECTION_CONNECTING]:
websocket.poll()
func _input(event):
if event is InputEventKey:
if event.pressed and event.scancode == KEY_D:
if event.pressed and event.scancode == KEY_D and event.alt:
print("## DEBUG NET INFO")
for p in get_tree().get_network_connected_peers():
var d = webrtc.get_peer(p)
@ -188,7 +188,6 @@ func _input(event):
print("Label: %s, Protocol: %s, Negotiated: %s" % [c.get_label(), c.get_protocol(), "true" if c.is_negotiated() else "false"])
else:
print("Channel is null?")
func _signaller_data():
var msg: String = websocket.get_peer(1).get_packet().get_string_from_utf8()
@ -225,7 +224,7 @@ func _process_signaller_message(data: Dictionary):
"lobby_left": _lobby_left(data.uuid)
"peer_data": _signaller_peer_data([data] if data.has("id") else data.data)
"peer_left": _signaller_peer_left(data.id)
"peer_left": _signaller_peer_left(int(data.id))
"candidate": _webrtc_candidate_received(data)
"offer": _webrtc_offer_received(data)
@ -265,7 +264,7 @@ func _create_peer(data: Dictionary):
if int(id) > webrtc.get_unique_id(): peer.create_offer()
peers[int(id)] = {
connected = false,
ready = false,
ready = data.ready if data.has("ready") else false,
name = data.name if data.has(name) else DEFAULT_DISPLAY_NAME,
}
emit_signal("peer_created", data)
@ -273,6 +272,7 @@ func _create_peer(data: Dictionary):
func _delete_peer(id):
if webrtc.has_peer(id): webrtc.remove_peer(id)
if peers.has(id): peers.erase(id)
emit_signal("peer_left", id)
func _webrtc_offer_created(type, data, id):
print("WebRTC %s created for peer %s" % [type, id])

View file

@ -17,6 +17,8 @@ func _update_text():
const keys = ["uuid", "display_name", "max_players", "current_players", "locked"]
func set_with_dict(dict):
if dict.has("name"): self.display_name = dict["name"]
if dict.has("currentPlayers"): self.current_players = dict["currentPlayers"]
if dict.has("maxPlayers"): self.max_players = dict["maxPlayers"]
for k in keys:
if dict.has(k):
self[k] = dict[k]

View file

@ -5,6 +5,8 @@ export(NodePath) onready var collider = get_node(collider) as CollisionShape2D
export(NodePath) onready var name_label = get_node(name_label) as Label
export(NodePath) onready var health_bar = get_node(health_bar) as ProgressBar
export(NodePath) onready var mana_bar = get_node(mana_bar) as ProgressBar
export(NodePath) onready var aim_indicator = get_node(aim_indicator) as Sprite
export(NodePath) onready var tile_indicator = get_node(tile_indicator) as Sprite
export var weight := 8
export var max_speed := 64 * 5 # ~5 tiles/sec at top speed
@ -44,6 +46,7 @@ onready var skills = []
# },
#]
remotesync var target := Vector2(0, 0)
remotesync var acceleration = Vector2.ZERO
remotesync var velocity = Vector2.ZERO
@ -86,9 +89,16 @@ func _ready():
print("Hiding Player Name %s..." % ns)
name_label.hide()
set_display_name(display_name)
if not is_network_master():
tile_indicator.modulate.a = 0.05
aim_indicator.modulate.a = 0.05
# if not is_network_master():
# mana_bar.hi
func _input(event):
if event is InputEventKey:
if event.pressed and event.scancode == KEY_P and event.alt:
position.y += 50
func set_display_name(i_name):
display_name = i_name
@ -109,6 +119,8 @@ func _physics_process(delta):
self.health += health_per_sec * delta
_process_input()
_process_animation()
aim_indicator.rotation = atan2(target.y, target.x) - PI/2
tile_indicator.global_position = ((target + position + Vector2(32, 32)) / 64).floor() * 64
rset_unreliable("velocity", move_and_slide((velocity + acceleration).clamped(max_speed), Vector2.ZERO, false, 4, 0.785398, false).move_toward(Vector2.ZERO, friction * delta))
for index in get_slide_count():
var collision = get_slide_collision(index)
@ -128,6 +140,7 @@ func _process_input():
iv.y = int_input_action(["ui_down", "down"]) - int_input_action(["ui_up", "up"])
rset_unreliable("acceleration", iv.normalized() * speed)
rset_unreliable("position", position)
rset_unreliable("target", get_local_mouse_position())
func _process_animation():
if sprite == null: return

View file

@ -1,11 +1,16 @@
extends KinematicBody2D
export var weight = 8
export var max_speed = 48 # ~3 tiles/sec at top speed
export var friction = 500
export var speed = 20
class_name Slime
export var weight := 8
export var max_speed = 48 * 5 # ~3 tiles/sec at top speed
export var friction = 2000
export var speed = 80
var target_player = null
var navigation: Navigation2D = null
var nav_path: PoolVector2Array = []
var target_position = null
remotesync var velocity = Vector2.ZERO
remotesync var acceleration = Vector2.ZERO
@ -17,24 +22,37 @@ enum {
}
var state = IDLE
onready var nav_line = $nav_line
func _ready():
rset_config("position", MultiplayerAPI.RPC_MODE_SLAVE)
func _draw():
pass
func _physics_process(delta):
nav_path = navigation.get_simple_path(position, target_player.position)
if not nav_path.empty() and (position - target_player.position).length() > (128 + 64):
if (nav_path[0] - position).length() < 5: target_position = nav_path[1]
else: target_position = nav_path[0]
else: target_position = null
nav_line.points = []
for p in nav_path:
nav_line.points.append(p - position)
# print(position, path, target_position, target_player)
match state:
IDLE:
if target_player != null:
if target_position != null:
state = CHASE
else:
rset_unreliable("acceleration", Vector2.ZERO)
WANDER:
pass
CHASE:
if target_player == null:
if target_position == null:
state = IDLE
else:
rset_unreliable("acceleration", (target_player.global_position - global_position).normalized() * speed)
rset_unreliable("acceleration", (target_position - position).normalized() * speed)
ATTACK:
pass
rset("velocity", move_and_slide((velocity + acceleration).clamped(max_speed), Vector2.ZERO, false, 4, 0.785398, false).move_toward(Vector2.ZERO, friction * delta))

View file

@ -4,13 +4,16 @@ onready var player_obj = preload("res://objects/player.tscn")
export(NodePath) onready var camera = get_node(camera) as Camera2D
export(NodePath) onready var menu = get_node(menu) as PopupDialog
export(NodePath) onready var players = get_node(players) as YSort
export(NodePath) onready var objects = get_node(objects) as YSort
export(NodePath) onready var nav = get_node(nav) as Navigation2D
onready var zoom_levels = [0.25, 0.5, 1, 1.5, 2, 2.5, 3]
onready var current_zoom_level_index = 2
onready var player = null
onready var players = null
func _ready():
for c in players.get_children(): c.queue_free()
# TODO: probably have to wait for all peers to be ready before we add players
# camera.zoom = Vector2(0.25, 0.25)
Global.client.connect("webrtc_peer_disconnected", self, "_webrtc_peer_disconnected")
@ -27,6 +30,10 @@ remotesync func ready(id):
var all_ready = true
for id in Global.client.peers: all_ready = all_ready and Global.client.peers[id].ready
if all_ready: start()
for c in objects.get_children():
if c is Slime:
c.target_player = Global.client.peers[id].player
c.navigation = nav
func _webrtc_peer_disconnected(id):
if Global.client.peers[id].has("player"):
@ -47,7 +54,7 @@ remotesync func add_player(id, name):
if id == get_tree().get_network_unique_id(): player = new_player
new_player.name = str(id)
new_player.set_network_master(id)
add_child(new_player)
players.add_child(new_player)
new_player.global_position = Vector2(-400 + (id % 800), -400 + (id % 800))
print("Added player: %s for peer %s named %s" % [new_player, id, name])
Global.client.peers[id].player = new_player

View file

@ -26,6 +26,7 @@ func _ready():
Global.client.connect("signaller_disconnected", self, "_signaller_disconnected")
Global.client.connect("webrtc_connection_succeeded", self, "_webrtc_connection_succeeded")
Global.client.connect("webrtc_peer_connected", self, "_webrtc_peer_connected")
# lobby_name.text = "%s" % Global.client.lobby_name
@ -39,6 +40,7 @@ func _signaller_disconnected():
func _lobby_joined(data):
add_chat("# Connected to %s" % data.name)
lobby_name.text = data.name
_update_ui()
_add_peer(data.id, {
connected = true,
@ -55,11 +57,11 @@ func _webrtc_connection_succeeded():
chat_edit.editable = true
Global.client.request_peer_list()
func _peer_created(peer):
func _peer_created(p):
call_deferred("update_player_count")
if is_host: call_deferred("update_can_start")
if peers.has(peer.id): _update_peer(peer.id, peer)
else: _add_peer(peer.id, peer)
if peers.has(p.id): _update_peer(p.id, p)
else: _add_peer(p.id, p)
func _add_peer(id, p):
call_deferred("update_player_count")
@ -76,24 +78,21 @@ func _update_peer(id, peer_data):
add_chat("! %s is %s" % [peers[id].display_name, update_text])
peers[id].set_with_dict(peer_data)
func _peer_left(leavers):
call_deferred("update_player_count")
for data in leavers:
var id = data.id
if peers.has(id):
var peer_id = peers[id].peerId
call_deferred("add_chat", "< %s left the lobby" % peers[id].display_name)
peers[id].queue_free()
peers.erase(id)
peers_id_mappings.erase(peer_id)
func peer_by_peer_id(peer_id):
if peers_id_mappings.has(peer_id):
var p = peers_id_mappings[peer_id]
if peers.has(p):
return peers[p]
return null
func _webrtc_peer_connected(id):
print("WebRTC Peer Connected: %s" % id)
if id != get_tree().get_network_unique_id():
print("Sending ready state from %s to %s: %s" % [get_tree().get_network_unique_id(), id, "true" if peers[get_tree().get_network_unique_id()].ready else "false"])
call_deferred("rpc_id", int(id), "set_ready", peers[get_tree().get_network_unique_id()].ready)
func _peer_left(id):
call_deferred("update_player_count")
if peers.has(id):
var peer_id = peers[id].peerId
call_deferred("add_chat", "< %s left the lobby" % peers[id].display_name)
peers[id].queue_free()
peers.erase(id)
peers_id_mappings.erase(peer_id)
remotesync func add_chat(message):
if auto_scroll_chk.pressed: call_deferred("scroll_chat_to_bottom")
else:
@ -143,6 +142,15 @@ func _on_TextEdit_text_entered(_new_text):
if !send_button.disabled:
send_chat_message()
remotesync func set_lobby_name(new_lobby_name: String):
if is_host: Global.client.set_lobby_name(new_lobby_name)
else: lobby_name.text = new_lobby_name
remotesync func set_max_players(new_max_players: String):
if int(new_max_players) <= 0: return
if is_host: Global.client.set_lobby_max_players(int(new_max_players))
else: max_players.text = str(int(new_max_players))
func _update_ui():
is_host = Global.client.is_host()
ready_up.visible = !is_host
@ -155,9 +163,10 @@ func _update_ui():
chat_edit.editable = is_in_lobby
send_button.disabled = !is_in_lobby
func _on_max_players_text_changed(new_text:String): rpc("set_max_players", new_text)
func _lobby_left(_id): Global.lobby_browser()
func _on_leave_button_pressed(): Global.client.leave_lobby()
func update_player_count(): peers_list_label.text = "Players: %d" % peers.size()
func _on_Button_pressed(): send_chat_message()
func _on_ready_up_toggled(button_pressed: bool): rpc("set_ready", button_pressed)
func _on_lobby_info_text_changed(new_text: String): Global.client.set_lobby_name(new_text)
func _on_lobby_info_text_changed(new_text: String): rpc("set_lobby_name", new_text)