From e9598b88841374301646a7115253ab38ac904e4c Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Fri, 24 Dec 2021 21:10:33 +0100 Subject: working --- scripts/fx/fx_enemy_damage.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/fx') diff --git a/scripts/fx/fx_enemy_damage.gd b/scripts/fx/fx_enemy_damage.gd index 48f4629..2ec1d96 100644 --- a/scripts/fx/fx_enemy_damage.gd +++ b/scripts/fx/fx_enemy_damage.gd @@ -1,7 +1,7 @@ extends Spatial var timer = 0 -var timer_life = 0.5 +var timer_life = 1 var anim_size = 1 @@ -9,9 +9,10 @@ var _mesh : MeshInstance var base -func refresh_shader(mat): +func refresh_shader(mat, color : Color): _mesh = get_child(0).get_child(0) _mesh.set_surface_material(0, mat) + _mesh.get_active_material(0).set_shader_param("albedo", color) func refresh_basis(): base = transform.basis -- cgit v1.2.3-54-g00ecf