This repository has been archived on 2025-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
ld50/assets/conveyorBeltChunk.gd

18 lines
320 B
GDScript

extends Spatial
onready var anim: AnimationPlayer = $AnimationPlayer
var belt_sound
func _ready() -> void:
belt_sound = Sound.instance("Belt").attach(self)
func roll(speed: float) -> void:
anim.play("conveyorBeltAnim", - 1.0, speed)
belt_sound.start()
func stop() -> void:
anim.stop(false)
belt_sound.stop()