I would like to interrupt the sequence below for 2 seconds and return to where it would be if it were not interrupted in the first place.
For example, from the code below, if I interrupted the sequence for 2 seconds, making the sprite visible from 1.5 to 3.5 seconds in the sequence (which means that in 1 second the hideInterval action plus the showSprite action and 0.5 second action showInterval will be skipped), the interrupt will end for 2.5 seconds remaining for the showInterval action. How can I make a sprite run an action for the remaining 2.5 seconds and continue with a normal sequence at this point.
Note that this example is for clarity, although I would prefer a more general way to resume a sequence after an interrupt.
let hideSprite = SKAction.fadeAlpha(to: 0, duration: 0.5) let showSprite = SKAction.fadeAlpha(to: 100, duration: 0.5) let hideInterval = SKAction.wait(forDuration: 2) let showInterval = SKAction.wait(forDuration: 3) let spriteSequence = SKAction.sequence([hideSprite, hideInterval, showSprite, showInterval]) sprite.runAction(SKAction.repeatForever(spriteSequence))
UPDATE
I think the following diagram will make my question more understandable and explain further what I want to achieve with interruption of the sequence.

source share