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 5a4eb37..79777cb 100644 Binary files a/ui/Inventory.png and b/ui/Inventory.png differ diff --git a/ui/Inventory.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