Added factory functions for TweenChannel because 'TweenChannel.new(TweenChannel.ArbitrationMode.REPLACE)' is kind of tedious to write.
This commit is contained in:
parent
0cfdf81b48
commit
4d2d82b199
|
@ -29,6 +29,18 @@ func _init(
|
||||||
) -> void:
|
) -> void:
|
||||||
arbitration_mode = p_arbitration_mode
|
arbitration_mode = p_arbitration_mode
|
||||||
|
|
||||||
|
## Creates a TweenChannel which arbitrates by yielding.
|
||||||
|
static func make_yielding() -> TweenChannel:
|
||||||
|
return new(ArbitrationMode.YIELD)
|
||||||
|
|
||||||
|
## Creates a TweenChannel which arbitrates by replacing.
|
||||||
|
static func make_replacing() -> TweenChannel:
|
||||||
|
return new(ArbitrationMode.REPLACE)
|
||||||
|
|
||||||
|
## Creates a TweenChannel which arbitrates by ignoring.
|
||||||
|
static func make_ignoring() -> TweenChannel:
|
||||||
|
return new(ArbitrationMode.IGNORE)
|
||||||
|
|
||||||
## 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