diff --git a/export_presets.cfg b/export_presets.cfg index 0e43412..3416258 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -33,8 +33,8 @@ architectures/armeabi-v7a=false architectures/arm64-v8a=true architectures/x86=false architectures/x86_64=false -version/code=3 -version/name="1.1.3" +version/code=4 +version/name="1.1.4" package/unique_name="org.bulwark.game" package/name="Bulwark" package/signed=true diff --git a/project.godot b/project.godot index bea268a..aae7d7a 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 config/name="Bulwark" config/description="A minimalist tower defense. Hold the line." -config/version="1.1.3" +config/version="1.1.4" run/main_scene="res://scenes/main_menu.tscn" config/features=PackedStringArray("4.7", "GL Compatibility") config/icon="res://assets/icons/icon.png" diff --git a/src/game/enemy.gd b/src/game/enemy.gd index 0e3a293..92ae35f 100644 --- a/src/game/enemy.gd +++ b/src/game/enemy.gd @@ -71,10 +71,11 @@ func setup(p_def: Dictionary, p_hp: float, p_speed: float, p_armor: float, var path_sprite := SPRITE_DIR + String(p_def.get("sprite", "grunt")) + ".png" if ResourceLoader.exists(path_sprite): _sprite.texture = load(path_sprite) - # Centre the sprite on the unit so rotating it spins around its own centre (the pivot is - # the node origin), not around a corner of the texture. - if _sprite.texture != null: - _sprite.offset = -_sprite.texture.get_size() * 0.5 + # Sprite2D is centred on the node origin by default (`centered = true`): the sprite + # sits exactly on the unit, so rotating it spins around its own centre and the health + # bar drawn above the node stays centred on the sprite. (Do not add an `offset` here — + # that would shift the sprite off the unit.) + _sprite.centered = true _sprite.scale = Vector2(scale_factor, scale_factor) _sprite.texture_filter = CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS add_child(_sprite) diff --git a/src/ui/level_select.gd b/src/ui/level_select.gd index 31f44a6..e7cdb11 100644 --- a/src/ui/level_select.gd +++ b/src/ui/level_select.gd @@ -26,8 +26,7 @@ func _build() -> void: scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL column.add_child(scroll) - var row := FlowContainer.new() - row.flow_direction = FlowContainer.FLOW_DIRECTION_LEFT_TO_RIGHT + var row := HFlowContainer.new() row.size_flags_horizontal = Control.SIZE_EXPAND_FILL row.size_flags_vertical = Control.SIZE_SHRINK_CENTER scroll.add_child(row) diff --git a/src/ui/settings_panel.gd b/src/ui/settings_panel.gd index d5757b3..feccf33 100644 --- a/src/ui/settings_panel.gd +++ b/src/ui/settings_panel.gd @@ -56,7 +56,8 @@ func _notification(what: int) -> void: _columns = desired _build() layout_changed.emit() - super._notification(what) + # No `super._notification()` call: the parent (Control) defines no `_notification` in + # GDScript, and calling it is a parse error on Godot 4.7. func _layout_sections() -> void: