diff --git a/util/TweenChannel.gd b/util/TweenChannel.gd index f676c96..da1471c 100644 --- a/util/TweenChannel.gd +++ b/util/TweenChannel.gd @@ -19,10 +19,16 @@ enum ArbitrationMode { ## and it changes while the call is yielding, then the in-progress call ## still will not return until its turn, as though arbitration_mode ## were still YIELD. -var arbitration_mode := ArbitrationMode.REPLACE +var arbitration_mode: ArbitrationMode ## Tween currently running if any, else null. var current_tween: Tween = null +## Initializer. Sets arbitration mode. +func _init( + p_arbitration_mode: ArbitrationMode = ArbitrationMode.YIELD +) -> void: + arbitration_mode = p_arbitration_mode + ## Returns target.create_tween() if and when arbitration_mode allows. ## ## "If:" if arbitration_mode is IGNORE and there is a current tween,