meat_madness_redux/godot/effects/npc/wall_struggler/WallStruggler.gd

10 lines
278 B
GDScript

extends MeshInstance
var has_played_animation = false
func _on_Area_body_entered(body: Node):
if body.name == "OnFootPhysics" and not has_played_animation:
has_played_animation = true
get_active_material(0).set_shader_param("start_time", Time.get_ticks_msec() / 1000.0)