Merge branch 'exp' of https://git.nfedorov.dev/DragonSpirit/KickSurvivors into exp
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user