diff options
| author | tpart <tpart120@proton.me> | 2024-09-04 21:31:13 +0200 | 
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2024-09-04 21:31:13 +0200 | 
| commit | 9ed1d51ad4abaa114da36e3284c8e29dd07855ad (patch) | |
| tree | 810be4af50f40dd9d69d73366338e073417b9919 /client/map/items/food_processor.gd | |
| parent | f1389c16aee688fd7dd67abb56b5e5c83aaf2c1c (diff) | |
| download | hurrycurry-9ed1d51ad4abaa114da36e3284c8e29dd07855ad.tar hurrycurry-9ed1d51ad4abaa114da36e3284c8e29dd07855ad.tar.bz2 hurrycurry-9ed1d51ad4abaa114da36e3284c8e29dd07855ad.tar.zst | |
Fix food processor rotation animation
Diffstat (limited to 'client/map/items/food_processor.gd')
| -rw-r--r-- | client/map/items/food_processor.gd | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd index 4a73cac5..81886ae7 100644 --- a/client/map/items/food_processor.gd +++ b/client/map/items/food_processor.gd @@ -16,6 +16,7 @@  class_name FoodProcessor  extends Item +var time := 0.  var processing: CPUParticles3D = load("res://map/items/processing.tscn").instantiate()  func _init(owned_by_: Node3D): @@ -23,12 +24,15 @@ func _init(owned_by_: Node3D):  	add_child(load("res://map/items/food_processor.tscn").instantiate())  	add_child(processing) +func _process(delta: float): +	super(delta) +	time += delta +	processing.rotation.y += time * TAU +	base.rotation.y += time * TAU +  func progress(position_: float, speed: float, warn: bool):  	super(position_, speed, warn)  	processing.emitting = true -	# TODO: Fix animation -	# processing.rotation.y += p * TAU -	# base.rotation.y += p * TAU  	if sound_id == null:  		sound_id = Sound.item_progress(  			self, | 
