From 071e816c951547928e005fb86433e9cc8cba4099 Mon Sep 17 00:00:00 2001 From: Logan Date: Sun, 19 Jul 2020 23:06:56 -0500 Subject: [PATCH] Doubled energy, cleaned up UI --- script/Inventory.gd | 1 + script/WandPosition.gd | 2 +- ui/Inventory.png | Bin 1260 -> 1709 bytes ui/Inventory.tscn | 46 ++++++++++++++++++++++++----------------- ui/PlayerStats.tscn | 5 +++-- 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/script/Inventory.gd b/script/Inventory.gd index c32c45d..c8f5c14 100644 --- a/script/Inventory.gd +++ b/script/Inventory.gd @@ -110,3 +110,4 @@ func _on_Projectile3_pressed(): func _on_Projectile4_pressed(): if Projectile4.is_visible() and active_projectile != Globals.Magic[Globals.Projectile4]: active_projectile = Globals.Magic[Globals.Projectile4] + diff --git a/script/WandPosition.gd b/script/WandPosition.gd index aeadb14..2c0ea3c 100644 --- a/script/WandPosition.gd +++ b/script/WandPosition.gd @@ -11,7 +11,7 @@ func set_current_conduit(conduit): add_child(conduit.instance()) func _process(delta): - if Input.is_action_pressed("shoot") and get_child_count() != 0 and parent.Stats.energy > 0: + if Input.is_action_pressed("shoot") and get_child_count() != 0 and parent.Stats.energy > 0 and not parent.Inventory.open: var energy_cost = get_children()[0].fire(get_parent().Inventory.active_projectile, null) if energy_cost != null: parent.energy -= energy_cost diff --git a/ui/Inventory.png b/ui/Inventory.png index 5a4eb379a351b66c1c6f763311e82c1cfa5fd764..79777cbf806f3c14c2ca733bed172d90f4eb8bb3 100644 GIT binary patch delta 1706 zcmV;b237g&39Su~7k_XF1^@s6gUy?a00001b5ch_0Itp)=>Px*XGugsRCt{2oxf`w zM-<23166HI0N?}!3s?cc0#-n&Q_UHAF1p(-ZzyLw%pfAq<}uJKi$Gkq3KY1-w~(Ot$$6lA*Oju?{9mTDNWyX7t$BL3{n0y!8QrSX0&b^McW9lDTZr$c6aZv^Aw9~ zc|zr9GrOWcbAEQ*S)gsc_RZ7vp3BTqZ4aAjeCHzQKHob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tscn b/ui/Inventory.tscn index e884e97..07f7db2 100644 --- a/ui/Inventory.tscn +++ b/ui/Inventory.tscn @@ -24,7 +24,7 @@ tracks/0/keys = { "times": PoolRealArray( 0, 0.2 ), "transitions": PoolRealArray( 1, 1 ), "update": 0, -"values": [ Vector2( 160, -43 ), Vector2( 160, 50 ) ] +"values": [ Vector2( 160, -55 ), Vector2( 160, 85 ) ] } [sub_resource type="Animation" id=2] @@ -40,7 +40,7 @@ tracks/0/keys = { "times": PoolRealArray( 0, 0.2 ), "transitions": PoolRealArray( 1, 1 ), "update": 0, -"values": [ Vector2( 160, 50 ), Vector2( 160, -43 ) ] +"values": [ Vector2( 160, 85 ), Vector2( 160, -55 ) ] } [node name="Inventory" type="CanvasLayer"] @@ -51,7 +51,7 @@ anims/SlideIn = SubResource( 1 ) anims/SlideOut = SubResource( 2 ) [node name="Inventory" type="Sprite" parent="."] -position = Vector2( 160, -43 ) +position = Vector2( 160, -55 ) texture = ExtResource( 1 ) [node name="Conduits" type="Node2D" parent="Inventory"] @@ -59,9 +59,10 @@ texture = ExtResource( 1 ) [node name="Conduit1" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 margin_left = -79.0 -margin_top = -17.9699 +margin_top = -30.0 margin_right = -65.0 -margin_bottom = 0.0300903 +margin_bottom = -12.0 +mouse_filter = 1 action_mode = 0 texture_normal = ExtResource( 3 ) expand = true @@ -73,9 +74,9 @@ __meta__ = { [node name="Conduit2" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 margin_left = -58.0 -margin_top = -19.0 +margin_top = -30.0 margin_right = -39.0 -margin_bottom = 3.0 +margin_bottom = -8.0 action_mode = 0 texture_normal = ExtResource( 4 ) expand = true @@ -87,9 +88,9 @@ __meta__ = { [node name="Conduit3" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 margin_left = -81.0 -margin_top = 5.0 +margin_top = -8.0 margin_right = -64.0 -margin_bottom = 27.0 +margin_bottom = 14.0 action_mode = 0 texture_normal = ExtResource( 5 ) expand = true @@ -101,9 +102,9 @@ __meta__ = { [node name="Conduit4" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 margin_left = -58.0 -margin_top = 5.0 +margin_top = -8.0 margin_right = -40.0 -margin_bottom = 27.0 +margin_bottom = 14.0 action_mode = 0 texture_normal = ExtResource( 6 ) expand = true @@ -116,9 +117,9 @@ __meta__ = { [node name="Projectile1" type="TextureButton" parent="Inventory/Projectiles"] margin_left = -28.0 -margin_top = -19.0 +margin_top = -30.0 margin_right = -12.0 -margin_bottom = -5.0 +margin_bottom = -16.0 action_mode = 0 texture_normal = ExtResource( 8 ) expand = true @@ -129,9 +130,9 @@ __meta__ = { [node name="Projectile2" type="TextureButton" parent="Inventory/Projectiles"] margin_left = 7.0 -margin_top = -19.0 +margin_top = -30.0 margin_right = 23.0 -margin_bottom = -5.0 +margin_bottom = -16.0 action_mode = 0 texture_normal = ExtResource( 7 ) expand = true @@ -142,9 +143,9 @@ __meta__ = { [node name="Projectile3" type="TextureButton" parent="Inventory/Projectiles"] margin_left = -28.0 -margin_top = 1.0 +margin_top = -10.0 margin_right = -12.0 -margin_bottom = 15.0 +margin_bottom = 4.0 action_mode = 0 texture_normal = ExtResource( 9 ) expand = true @@ -155,9 +156,9 @@ __meta__ = { [node name="Projectile4" type="TextureButton" parent="Inventory/Projectiles"] margin_left = 7.0 -margin_top = 1.0 +margin_top = -10.0 margin_right = 23.0 -margin_bottom = 15.0 +margin_bottom = 4.0 action_mode = 0 texture_normal = ExtResource( 10 ) expand = true @@ -168,6 +169,12 @@ __meta__ = { [node name="Effects" type="Node2D" parent="Inventory"] visible = false + +[node name="Button" type="TextureButton" parent="Inventory"] +margin_left = -22.0 +margin_top = 35.0 +margin_right = 23.0 +margin_bottom = 55.0 [connection signal="pressed" from="Inventory/Conduits/Conduit1" to="." method="_on_Conduit1_toggled"] [connection signal="pressed" from="Inventory/Conduits/Conduit2" to="." method="_on_Conduit2_toggled"] [connection signal="pressed" from="Inventory/Conduits/Conduit3" to="." method="_on_Conduit3_toggled"] @@ -176,3 +183,4 @@ visible = false [connection signal="pressed" from="Inventory/Projectiles/Projectile2" to="." method="_on_Projectile2_pressed"] [connection signal="pressed" from="Inventory/Projectiles/Projectile3" to="." method="_on_Projectile3_pressed"] [connection signal="pressed" from="Inventory/Projectiles/Projectile4" to="." method="_on_Projectile4_pressed"] +[connection signal="pressed" from="Inventory/Button" to="." method="set_open" binds= [ false ]] diff --git a/ui/PlayerStats.tscn b/ui/PlayerStats.tscn index c758d63..09d6eaa 100644 --- a/ui/PlayerStats.tscn +++ b/ui/PlayerStats.tscn @@ -39,8 +39,9 @@ margin_left = 4.0 margin_top = -5.0 margin_right = -64.0 margin_bottom = -16.0 -max_value = 5.0 -value = 5.0 +max_value = 10.0 +step = 1.0 +value = 10.0 texture_progress = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false