fix sequences not being able to jump indexes during setup
This commit is contained in:
parent
40ae307c66
commit
8b35e09f42
|
|
@ -26,7 +26,9 @@ func _ready() -> void:
|
|||
sequence_actors.append([null, null])
|
||||
|
||||
func sign_up_for_sequence(callable: Callable, sequence_id: id, index: int):
|
||||
# if this assertion fails, two objects tried to sign up for the same sequence or an empty slot has been missing.
|
||||
if sequence_actors[sequence_id].size() <= index:
|
||||
sequence_actors[sequence_id].resize(index+1)
|
||||
# if this assertion fails, two objects tried to sign up for the same sequence.
|
||||
assert(sequence_actors[sequence_id][index] == null)
|
||||
sequence_actors[sequence_id][index] = callable
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue