This commit is contained in:
Georgiy Gorin
2026-04-23 16:27:03 +03:00
8 changed files with 246 additions and 10 deletions
+16
View File
@@ -120,6 +120,22 @@ func setup(type: String, wave: int) -> void:
kick_tier = enemy_level
toughness_tier = enemy_level
_update_label()
_apply_mesh(enemy_level)
func _apply_mesh(level: int) -> void:
var idx := clampi(level, 1, 3)
var mesh_res := load("res://assets/gnome%d.obj" % idx) as Mesh
if mesh_res == null:
return
var new_mat := StandardMaterial3D.new()
var tex := load("res://assets/gnome%d.png" % idx) as Texture2D
if tex != null:
new_mat.albedo_texture = tex
new_mat.albedo_color = Color.WHITE
mesh_node.mesh = mesh_res
mesh_node.material_override = new_mat
mat = new_mat
COLOR_CHASE = Color.WHITE
func _physics_process(delta: float) -> void:
match state: