Compare commits

...

2 Commits

Author SHA1 Message Date
DragonSpirit a835ae5755 fix tutorial images 2026-04-23 17:14:15 +03:00
DragonSpirit d20360c8f3 apply boot material 2026-04-23 17:11:45 +03:00
2 changed files with 22 additions and 6 deletions
+6 -6
View File
@@ -525,18 +525,18 @@ func _create_tutorial_overlay() -> void:
tutorial_canvas.add_child(bg)
tutorial_image = TextureRect.new()
tutorial_image.anchor_left = 0.1
tutorial_image.anchor_right = 0.9
tutorial_image.anchor_top = 0.07
tutorial_image.anchor_bottom = 0.84
tutorial_image.anchor_left = 0.02
tutorial_image.anchor_right = 0.98
tutorial_image.anchor_top = 0.02
tutorial_image.anchor_bottom = 0.91
tutorial_image.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
tutorial_image.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
tutorial_image.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
tutorial_canvas.add_child(tutorial_image)
tutorial_hint = Label.new()
tutorial_hint.anchor_left = 0.5
tutorial_hint.anchor_right = 0.5
tutorial_hint.anchor_top = 0.88
tutorial_hint.anchor_top = 0.93
tutorial_hint.offset_left = -280
tutorial_hint.offset_right = 280
tutorial_hint.text = "Нажмите ЛКМ чтобы продолжить"
+16
View File
@@ -43,8 +43,23 @@ func _ready() -> void:
add_to_group("player")
player_mat = mesh_node.get_surface_override_material(0).duplicate() as StandardMaterial3D
mesh_node.set_surface_override_material(0, player_mat)
mesh_node_boot.visible = false
_setup_indicator()
func _apply_boot_mesh(tier: int) -> void:
if tier <= 0:
mesh_node_boot.visible = false
return
mesh_node_boot.visible = true
var tex := load("res://assets/boot%d.png" % tier) as Texture2D
if tex == null:
return
var mat := mesh_node_boot.get_surface_override_material(0)
if mat == null:
mat = StandardMaterial3D.new()
mesh_node_boot.set_surface_override_material(0, mat)
(mat as StandardMaterial3D).albedo_texture = tex
func _setup_indicator() -> void:
indicator_node.position.y = 0.02
indicator_node.mesh = _make_kick_arc_mesh()
@@ -280,6 +295,7 @@ func apply_upgrade(id: String) -> void:
func apply_upgrade_boots(speed_bonus: float, _tier: int) -> void:
kick_tier += 1
move_speed += speed_bonus
_apply_boot_mesh(kick_tier)
var tw := create_tween()
tw.tween_property(player_mat, "albedo_color", Color(1.0, 0.85, 0.2), 0.1)
tw.tween_property(player_mat, "albedo_color", BASE_COLOR, 0.4)