Immediately changed my mind about previous commit and changed default tween channel arbitration mode back to YIELD. Instead implemented a constructor which takes arbitration mode as an optional parameter. This way I can initialize arbitration mode to REPLACE as needed in variable declarations of type TweenChannel, rather than having to do it in _ready, and still have the default be YIELD.
This commit is contained in:
parent
ebae0648c8
commit
0cfdf81b48
|
@ -19,10 +19,16 @@ enum ArbitrationMode {
|
||||||
## and it changes while the call is yielding, then the in-progress call
|
## and it changes while the call is yielding, then the in-progress call
|
||||||
## still will not return until its turn, as though arbitration_mode
|
## still will not return until its turn, as though arbitration_mode
|
||||||
## were still YIELD.
|
## were still YIELD.
|
||||||
var arbitration_mode := ArbitrationMode.REPLACE
|
var arbitration_mode: ArbitrationMode
|
||||||
## Tween currently running if any, else null.
|
## Tween currently running if any, else null.
|
||||||
var current_tween: Tween = 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.
|
## Returns target.create_tween() if and when arbitration_mode allows.
|
||||||
##
|
##
|
||||||
## "If:" if arbitration_mode is IGNORE and there is a current tween,
|
## "If:" if arbitration_mode is IGNORE and there is a current tween,
|
||||||
|
|
Loading…
Reference in New Issue