diff --git a/project.godot b/project.godot index 2402a23..9c7cec1 100644 --- a/project.godot +++ b/project.godot @@ -13,6 +13,7 @@ config_version=5 config/name="Facsimile Wing" run/main_scene="uid://bj4fytc3sy482" config/features=PackedStringArray("4.7", "Forward Plus") +run/max_fps=60 config/icon="res://icon.svg" [autoload] diff --git a/resources/player_weapon_resources/stock.tres b/resources/player_weapon_resources/stock.tres index e8b91cb..184daab 100644 --- a/resources/player_weapon_resources/stock.tres +++ b/resources/player_weapon_resources/stock.tres @@ -8,7 +8,7 @@ script = ExtResource("2_ym48c") shot_name = "stock" bullet_scene = ExtResource("1_lcw6o") damage = 2 -speed = 500 +speed = 300 spacing = 25.0 origin = -15 horizontal_offset = 10.0 diff --git a/resources/player_weapon_resources/tri.tres b/resources/player_weapon_resources/tri.tres index 0b63301..b567df8 100644 --- a/resources/player_weapon_resources/tri.tres +++ b/resources/player_weapon_resources/tri.tres @@ -8,7 +8,7 @@ script = ExtResource("2_syw6j") shot_name = "tri" bullet_scene = ExtResource("1_07hyh") damage = 3 -speed = 450 +speed = 420 projectiles = 3 spacing = 30.0 origin = -15 diff --git a/resources/player_weapon_resources/vanguard.tres b/resources/player_weapon_resources/vanguard.tres index 61f7a1c..dcb3580 100644 --- a/resources/player_weapon_resources/vanguard.tres +++ b/resources/player_weapon_resources/vanguard.tres @@ -8,7 +8,7 @@ script = ExtResource("2_w7xlm") shot_name = "vanguard" bullet_scene = ExtResource("1_hm46f") damage = 5 -speed = 550 +speed = 500 projectiles = 5 spacing = 30.0 origin = -15 diff --git a/scenes/notification_display.tscn b/scenes/notification_display.tscn index 982c58f..4180e5e 100644 --- a/scenes/notification_display.tscn +++ b/scenes/notification_display.tscn @@ -11,7 +11,8 @@ icon = NodePath("HBoxContainer/Icon") label = NodePath("HBoxContainer/Label") [node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=228546504] -layout_mode = 0 +layout_mode = 1 +theme_override_constants/separator = 4 [node name="Icon" type="TextureRect" parent="HBoxContainer" unique_id=3] custom_minimum_size = Vector2(16, 16) diff --git a/scenes/player_weapons/weapon_stock.tscn b/scenes/player_weapons/weapon_stock.tscn index 5eddb30..9989ab5 100644 --- a/scenes/player_weapons/weapon_stock.tscn +++ b/scenes/player_weapons/weapon_stock.tscn @@ -29,11 +29,11 @@ animations = [{ }], "loop": 1, "name": &"default", -"speed": 24.0 +"speed": 30.0 }] [sub_resource type="RectangleShape2D" id="RectangleShape2D_mvdrj"] -size = Vector2(6.666667, 14) +size = Vector2(10, 16) [node name="StockWeapon" type="Area2D" unique_id=1832200900] script = ExtResource("1_u1d5o") diff --git a/scenes/world.tscn b/scenes/world.tscn index 6383760..515828a 100644 --- a/scenes/world.tscn +++ b/scenes/world.tscn @@ -5,7 +5,7 @@ [ext_resource type="Texture2D" uid="uid://b3dqvd23nbmrm" path="res://graphics/cloud layers.png" id="3_4wyf3"] [ext_resource type="PackedScene" uid="uid://c3scm07fgpkcp" path="res://scenes/notification_display.tscn" id="3_71j4m"] [ext_resource type="PackedScene" uid="uid://6wq3ynesnsha" path="res://scenes/player.tscn" id="3_k0juu"] -[ext_resource type="Script" uid="uid://eblemtukrey6" path="res://scripts/fps_display.gd" id="4_qfnet"] +[ext_resource type="Script" uid="uid://eblemtukrey6" path="res://scripts/utility/fps_display.gd" id="4_qfnet"] [node name="World" type="Node2D" unique_id=1317852169] diff --git a/scripts/notification_display.gd b/scripts/notification_display.gd index 2150af8..4dbbc48 100644 --- a/scripts/notification_display.gd +++ b/scripts/notification_display.gd @@ -13,7 +13,19 @@ var _connector_line: Line2D = null var _connector_visible: bool = false +func _ready() -> void: + # Start fully transparent so the initial (0,0) position is invisible. + # This runs during add_child() before any rendering occurs. + modulate.a = 0.0 + + # 4px horizontal padding inside the background box + _container.add_theme_constant_override("margin_left", 4) + _container.add_theme_constant_override("margin_right", 4) + + func show_notification(weapon_name: String, player_node: Node2D, player_sprite_size: Vector2, origin_offset: float) -> void: + modulate.a = 0.0 + label.add_theme_font_size_override("font_size", 8) label.text = weapon_name @@ -40,9 +52,8 @@ func show_notification(weapon_name: String, player_node: Node2D, player_sprite_s _update_position() var target_pos = position - # Start 10px above destination, fully transparent + # Start 10px above destination (already transparent from line 17) position.y = target_pos.y - 10.0 - modulate.a = 0.0 # Create connector line immediately so it fades in with the notification _connector_line = Line2D.new() diff --git a/scripts/fps_display.gd b/scripts/utility/fps_display.gd similarity index 100% rename from scripts/fps_display.gd rename to scripts/utility/fps_display.gd diff --git a/scripts/fps_display.gd.uid b/scripts/utility/fps_display.gd.uid similarity index 100% rename from scripts/fps_display.gd.uid rename to scripts/utility/fps_display.gd.uid