Skip to content

Instantly share code, notes, and snippets.

@arypbatista arypbatista/
Last active Feb 26, 2017

What would you like to do?
Multi-lock for process tasks. You can add multiple tags referring a behavior you are executing and needs processing. When first tag is added, processing tasks will be launched. When last tag is removed, processing tasks will finish.
# Tag Process
var _node
var _locks = {}
var _mode
func _init(node, mode='fixed_process'):
_node = node
_mode = mode
func add(tag):
_locks[tag] = true
func remove(tag):
func update():'set_' + _mode, _locks.size() > 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.