diff --git a/Assets/Fonts/calamity/calamity-spaced.tres b/Assets/Fonts/calamity/calamity-spaced.tres new file mode 100644 index 0000000..f794095 --- /dev/null +++ b/Assets/Fonts/calamity/calamity-spaced.tres @@ -0,0 +1,7 @@ +[gd_resource type="FontVariation" load_steps=2 format=3 uid="uid://cnjpt3yy746ob"] + +[ext_resource type="FontFile" uid="uid://6bvgjbmqovau" path="res://Assets/Fonts/calamity/calamity.ttf" id="1_m4w5i"] + +[resource] +base_font = ExtResource("1_m4w5i") +spacing_glyph = 4 diff --git a/Assets/Sprites/UI/border.ase b/Assets/Sprites/UI/border.ase new file mode 100644 index 0000000..f593068 Binary files /dev/null and b/Assets/Sprites/UI/border.ase differ diff --git a/Assets/Sprites/UI/border.png b/Assets/Sprites/UI/border.png new file mode 100644 index 0000000..181cc5e Binary files /dev/null and b/Assets/Sprites/UI/border.png differ diff --git a/Assets/Sprites/UI/border.png.import b/Assets/Sprites/UI/border.png.import new file mode 100644 index 0000000..a35e4e8 --- /dev/null +++ b/Assets/Sprites/UI/border.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cd8ak8gu0104t" +path="res://.godot/imported/border.png-c957ce067800ad93e4d5a5a409cc0f49.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/UI/border.png" +dest_files=["res://.godot/imported/border.png-c957ce067800ad93e4d5a5a409cc0f49.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Assets/Sprites/UI/menu-center.ase b/Assets/Sprites/UI/menu-center.ase new file mode 100644 index 0000000..d30e7cd Binary files /dev/null and b/Assets/Sprites/UI/menu-center.ase differ diff --git a/Assets/Sprites/UI/menu-center.png b/Assets/Sprites/UI/menu-center.png new file mode 100644 index 0000000..81d9852 Binary files /dev/null and b/Assets/Sprites/UI/menu-center.png differ diff --git a/Assets/Sprites/UI/menu-center.png.import b/Assets/Sprites/UI/menu-center.png.import new file mode 100644 index 0000000..3b4d29e --- /dev/null +++ b/Assets/Sprites/UI/menu-center.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://t467i5xou4ug" +path="res://.godot/imported/menu-center.png-fa37aff35ac70bec324c3aa847f905cd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Sprites/UI/menu-center.png" +dest_files=["res://.godot/imported/menu-center.png-fa37aff35ac70bec324c3aa847f905cd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Events/AreaChangedArgs.cs b/Events/AreaChangedArgs.cs new file mode 100644 index 0000000..065103d --- /dev/null +++ b/Events/AreaChangedArgs.cs @@ -0,0 +1,6 @@ +namespace SupaLidlGame.Events; + +public partial class AreaChangedArgs : Args +{ + public Scenes.Map Map { get; set; } +} diff --git a/Events/EventBus.cs b/Events/EventBus.cs index 2661ef1..2f93bbc 100644 --- a/Events/EventBus.cs +++ b/Events/EventBus.cs @@ -7,6 +7,9 @@ public partial class EventBus : Node [Signal] public delegate void RequestMoveToAreaEventHandler(RequestAreaArgs args); + [Signal] + public delegate void AreaChangedEventHandler(Scenes.Map map); + [Signal] public delegate void PlayerDeathEventHandler(HurtArgs args); diff --git a/Scenes/Maps/Arena.tscn b/Scenes/Maps/Arena.tscn index e1687d6..f647150 100644 --- a/Scenes/Maps/Arena.tscn +++ b/Scenes/Maps/Arena.tscn @@ -11,7 +11,7 @@ [ext_resource type="PackedScene" uid="uid://dldnp8eunxj3q" path="res://BoundingBoxes/InteractionTrigger.tscn" id="9_3401j"] [ext_resource type="Script" path="res://BoundingBoxes/ConnectorBox.cs" id="9_fg062"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_pg4a6"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7dryp"] resource_local_to_scene = true shader = ExtResource("5_h8k5p") shader_parameter/color = Vector4(1, 1, 1, 1) @@ -113,7 +113,7 @@ visible = false position = Vector2(120, -112) [node name="Doc" parent="Entities" index="0" instance=ExtResource("4_ej0f3")] -material = SubResource("ShaderMaterial_pg4a6") +material = SubResource("ShaderMaterial_7dryp") [node name="PointLight2D" type="PointLight2D" parent="Entities" index="1"] position = Vector2(168, -42) diff --git a/Scenes/Maps/ArenaExterior.tscn b/Scenes/Maps/ArenaExterior.tscn index 24cbf76..842a50e 100644 --- a/Scenes/Maps/ArenaExterior.tscn +++ b/Scenes/Maps/ArenaExterior.tscn @@ -161,70 +161,70 @@ size = Vector2(64, 97) [sub_resource type="RectangleShape2D" id="RectangleShape2D_5pcme"] size = Vector2(18, 6) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_vw5b5"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_1q1be"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_8p2xl"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_obny8"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_ndk4b"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_exlka"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_yll4k"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ec2v5"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_yuyxc"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ohpa0"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_ecd57"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_aiu1q"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_ewmj1"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_bf84d"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_k255s"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7skkn"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_4sns8"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_soae1"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) shader_parameter/intensity = 0.0 shader_parameter/alpha_modulate = 1.0 -[sub_resource type="ShaderMaterial" id="ShaderMaterial_w1raa"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_to8fm"] resource_local_to_scene = true shader = ExtResource("28_b3suq") shader_parameter/color = Vector4(1, 1, 1, 1) @@ -241,8 +241,8 @@ layer_4/tile_data = PackedInt32Array(2097150, 655360, 2, 2359293, 655360, 1, 235 CameraLowerBound = Vector2(0, 0) CameraUpperBound = Vector2(0, 0) ClearColor = Color(0.105882, 0.0470588, 0.117647, 1) -AreaName = "Depths of the Arena" -MapName = "The Arena" +AreaName = "The Arena" +MapName = "Depths of the Arena" [node name="CanvasModulate" parent="." index="0"] color = Color(0.5, 0.5, 0.5, 1) @@ -677,43 +677,43 @@ position = Vector2(256, -9) position = Vector2(80, 373) [node name="Centurion" parent="Entities" index="7" instance=ExtResource("30_qfl2k")] -material = SubResource("ShaderMaterial_vw5b5") +material = SubResource("ShaderMaterial_1q1be") position = Vector2(-360, 31) [node name="Centurion2" parent="Entities" index="8" instance=ExtResource("30_qfl2k")] -material = SubResource("ShaderMaterial_8p2xl") +material = SubResource("ShaderMaterial_obny8") position = Vector2(-224, 131) [node name="Legionary" parent="Entities" index="9" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_ndk4b") +material = SubResource("ShaderMaterial_exlka") position = Vector2(-214, 72) [node name="Legionary2" parent="Entities" index="10" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_yll4k") +material = SubResource("ShaderMaterial_ec2v5") position = Vector2(-496, 15) [node name="Legionary3" parent="Entities" index="11" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_yuyxc") +material = SubResource("ShaderMaterial_ohpa0") position = Vector2(-240, 152) [node name="Legionary4" parent="Entities" index="12" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_ecd57") +material = SubResource("ShaderMaterial_aiu1q") position = Vector2(-300, 384) [node name="Legionary5" parent="Entities" index="13" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_ewmj1") +material = SubResource("ShaderMaterial_bf84d") position = Vector2(-300, 401) [node name="Legionary6" parent="Entities" index="14" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_k255s") +material = SubResource("ShaderMaterial_7skkn") position = Vector2(-316, 425) [node name="Legionary7" parent="Entities" index="15" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_4sns8") +material = SubResource("ShaderMaterial_soae1") position = Vector2(-300, 449) [node name="Legionary8" parent="Entities" index="16" instance=ExtResource("27_84gw4")] -material = SubResource("ShaderMaterial_w1raa") +material = SubResource("ShaderMaterial_to8fm") position = Vector2(-404, 505) [editable path="Props/StaticBookshelf"] diff --git a/Shaders/Wipe.gdshader b/Shaders/Wipe.gdshader new file mode 100644 index 0000000..7cebd6d --- /dev/null +++ b/Shaders/Wipe.gdshader @@ -0,0 +1,11 @@ +shader_type canvas_item; + +uniform float amount : hint_range(0.5, 1.0, 0.01) = 1; + +void fragment() { + // Place fragment code here. + //COLOR = texture(TEXTURE, UV); + if (UV.x > amount || UV.x < 1.0 - amount) { + COLOR.a = 0.0; + } +} diff --git a/UI/Base.tscn b/UI/Base.tscn index 50aacf4..7770bdc 100644 --- a/UI/Base.tscn +++ b/UI/Base.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=5 format=3 uid="uid://c271rdjhd1gfo"] +[gd_scene load_steps=6 format=3 uid="uid://c271rdjhd1gfo"] [ext_resource type="PackedScene" uid="uid://73jm5qjy52vq" path="res://Dialogue/balloon.tscn" id="1_atjb1"] [ext_resource type="Script" path="res://UI/UIController.cs" id="2_b4b6l"] [ext_resource type="PackedScene" uid="uid://bxo553hblp6nf" path="res://UI/HealthBar.tscn" id="3_j1j6h"] [ext_resource type="PackedScene" uid="uid://01d24ij5av1y" path="res://UI/BossBar.tscn" id="4_igi28"] +[ext_resource type="PackedScene" uid="uid://c77754nvmckn" path="res://UI/LocationDisplay.tscn" id="5_cr6vo"] [node name="BaseUI" type="CanvasLayer"] @@ -71,7 +72,4 @@ alignment = 1 visible = false layout_mode = 2 -[node name="Location" type="Control" parent="SubViewportContainer/UIViewport/MainUILayer/Main"] -anchors_preset = 0 -offset_right = 40.0 -offset_bottom = 40.0 +[node name="LocationDisplay" parent="SubViewportContainer/UIViewport/MainUILayer" instance=ExtResource("5_cr6vo")] diff --git a/UI/LocationDisplay.cs b/UI/LocationDisplay.cs new file mode 100644 index 0000000..eb3ab8a --- /dev/null +++ b/UI/LocationDisplay.cs @@ -0,0 +1,32 @@ +using Godot; +using SupaLidlGame.Extensions; + +namespace SupaLidlGame.UI; + +public partial class LocationDisplay : CenterContainer +{ + private Label _mapName; + private Label _subtitle; + private AnimationPlayer _animPlayer; + + public override void _Ready() + { + _mapName = GetNode