aboutsummaryrefslogtreecommitdiff
path: root/scripts/fx/fx_enemy_damage.gd
diff options
context:
space:
mode:
authorjacopograndi <jacopo.grandi@outlook.it>2021-12-24 21:10:33 +0100
committerjacopograndi <jacopo.grandi@outlook.it>2021-12-24 21:10:33 +0100
commite9598b88841374301646a7115253ab38ac904e4c (patch)
tree0ddc46c3ebd34762408cb108a3dbfb98d669af85 /scripts/fx/fx_enemy_damage.gd
parent156420f2a4635a84390e8ff488d12b8f84fea94f (diff)
working
Diffstat (limited to 'scripts/fx/fx_enemy_damage.gd')
-rw-r--r--scripts/fx/fx_enemy_damage.gd5
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