diff --git a/graphics/hud/shard_counter.png.import b/graphics/hud/shard_counter.png.import new file mode 100644 index 0000000..ea8ef57 --- /dev/null +++ b/graphics/hud/shard_counter.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/shard_counter.png-21107511ef3e175bf6cbab17710b5745.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/hud/shard_counter.png" +dest_files=[ "res://.import/shard_counter.png-21107511ef3e175bf6cbab17710b5745.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/graphics/player/sg_duck.png b/graphics/player/sg_duck.png new file mode 100644 index 0000000..3665d2d Binary files /dev/null and b/graphics/player/sg_duck.png differ diff --git a/graphics/player/sg_duck.png.import b/graphics/player/sg_duck.png.import new file mode 100644 index 0000000..c966fe5 --- /dev/null +++ b/graphics/player/sg_duck.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sg_duck.png-2c4af6f61584cc7699021d5bd8cdd8a4.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/player/sg_duck.png" +dest_files=[ "res://.import/sg_duck.png-2c4af6f61584cc7699021d5bd8cdd8a4.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/maps/level_select.tscn b/maps/level_select.tscn index 91444a7..5213f4c 100644 --- a/maps/level_select.tscn +++ b/maps/level_select.tscn @@ -82,7 +82,7 @@ margin_top = 134.0 margin_right = 213.0 margin_bottom = 144.0 theme = ExtResource( 1 ) -text = "Collect all coins" +text = "AAAAAAAAAAAAAAAAAAAAAAAA" align = 1 [node name="EasyModeText" type="Label" parent="."] diff --git a/objects/collectibles/shard.gd b/objects/collectibles/shard.gd index 294d384..abbbfb5 100644 --- a/objects/collectibles/shard.gd +++ b/objects/collectibles/shard.gd @@ -1,14 +1,19 @@ extends Node2D +signal collected(shard_number) + export var value = 1 export var number = 0 #Used for saving which specific shards collected func _ready(): + var hud = get_tree().get_nodes_in_group("hud").pop_back() + connect("collected",hud,"shard_popup") $AnimationPlayer.play("glow") func _on_Area2D_body_entered(body): #Collect if body.is_in_group("player"): + emit_signal("collected",number) Audio.play_shard_sound() Game.score += 500 Game.shards += value diff --git a/objects/hud/hud.gd b/objects/hud/hud.gd index 3e984cb..d983165 100644 --- a/objects/hud/hud.gd +++ b/objects/hud/hud.gd @@ -32,6 +32,17 @@ func _ready(): tween.tween_interval(3.0) tween.tween_property(music, "rect_position:x", 256.0, 1.0) +func shard_popup(shard_number): + #Change text to song name + var shard_title = $ShardTitle + var level = LevelData.levels[Game.current_level] + shard_title.text = "§" + str(level.shard_titles[shard_number]) + yield(get_tree(), "idle_frame") + var tween = create_tween() + tween.tween_property(shard_title, "rect_position:x", 254.0 - shard_title.rect_size.x, 1.0) + tween.tween_interval(3.0) + tween.tween_property(shard_title, "rect_position:x", 256.0, 1.0) + func _physics_process(delta): #Gold Counter gold_counter.text = "%02d" % Game.keys diff --git a/objects/hud/hud.tscn b/objects/hud/hud.tscn index e55518d..244b241 100644 --- a/objects/hud/hud.tscn +++ b/objects/hud/hud.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://graphics/hud/stars_hud.png" type="Texture" id=1] [ext_resource path="res://graphics/hud/lives_head.png" type="Texture" id=2] @@ -8,17 +8,21 @@ [ext_resource path="res://objects/hud/hud.gd" type="Script" id=6] [ext_resource path="res://graphics/hud/key_counter.png" type="Texture" id=7] [ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=8] -[ext_resource path="res://ui/2ndpuberty_no_dropshadow.tres" type="Theme" id=9] +[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=9] [ext_resource path="res://ui/theme.tres" type="Theme" id=10] [sub_resource type="ShaderMaterial" id=1] [sub_resource type="ShaderMaterial" id=2] -[node name="HUD" type="CanvasLayer"] +[sub_resource type="ShaderMaterial" id=3] +shader = ExtResource( 9 ) +shader_param/border_color = Color( 0.219608, 0.219608, 0.219608, 1 ) +shader_param/border_corners = true + +[node name="HUD" type="CanvasLayer" groups=["hud"]] layer = 100 script = ExtResource( 6 ) -song_name = "♫Music" bonus_color = Color( 0.478431, 1, 0.47451, 1 ) [node name="Back" type="Sprite" parent="."] @@ -156,6 +160,16 @@ anchor_right = 1.0 anchor_bottom = 1.0 margin_top = -10.0 margin_right = 42.0 -theme = ExtResource( 9 ) +theme = ExtResource( 10 ) text = "♫Music" align = 2 + +[node name="ShardTitle" type="Label" parent="."] +material = SubResource( 3 ) +margin_left = 256.0 +margin_top = 182.0 +margin_right = 333.0 +margin_bottom = 192.0 +theme = ExtResource( 10 ) +text = "§time bonus" +align = 2 diff --git a/objects/player/player_scholar.tscn b/objects/player/player_scholar.tscn index 158d475..fea69b5 100644 --- a/objects/player/player_scholar.tscn +++ b/objects/player/player_scholar.tscn @@ -1157,8 +1157,8 @@ script = ExtResource( 8 ) [connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"] [connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded" to="." method="_process_grounded"] -[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement"] [connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Still" to="." method="_on_Still_state_entered"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Walking" to="." method="_on_Walking_state_entered"] [connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Blinking" to="." method="_on_Blinking_state_entered"] @@ -1168,8 +1168,8 @@ script = ExtResource( 8 ) [connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/Pushing" to="." method="_process_pushing"] [connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="_on_Airborne_state_entered"] [connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne" to="." method="_process_gravity"] -[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_horizontal_movement"] [connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_jump"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_horizontal_movement"] [connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Jump/NormalJump" to="." method="_on_NormalJump_state_entered"] [connection signal="state_exited" from="StateChart/Root/Movement/Airborne/Jump/NormalJump" to="." method="_on_NormalJump_state_exited"] [connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Jump/LadderJump" to="." method="_on_LadderJump_state_entered"] diff --git a/ui/2ndpuberty_scholar.png b/ui/2ndpuberty_scholar.png index 29c329b..b25c1bb 100644 Binary files a/ui/2ndpuberty_scholar.png and b/ui/2ndpuberty_scholar.png differ diff --git a/ui/2ndpuberty_scholar_no_dropshadow.png b/ui/2ndpuberty_scholar_no_dropshadow.png index 452d120..53f506b 100644 Binary files a/ui/2ndpuberty_scholar_no_dropshadow.png and b/ui/2ndpuberty_scholar_no_dropshadow.png differ