diff options
author | jacopograndi <jacopo.grandi@outlook.it> | 2021-12-24 21:10:33 +0100 |
---|---|---|
committer | jacopograndi <jacopo.grandi@outlook.it> | 2021-12-24 21:10:33 +0100 |
commit | e9598b88841374301646a7115253ab38ac904e4c (patch) | |
tree | 0ddc46c3ebd34762408cb108a3dbfb98d669af85 /scripts/fx | |
parent | 156420f2a4635a84390e8ff488d12b8f84fea94f (diff) |
working
Diffstat (limited to 'scripts/fx')
-rw-r--r-- | scripts/fx/fx_enemy_damage.gd | 5 |
1 files changed, 3 insertions, 2 deletions
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 |