ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -


I have a SKScene where I am adding an SKSpriteNode I have subclassed the SKSpriteNode class to create this node. In the subclass I am defining some SKActions on Sprite. What do I want to do when the end of this phantom ends the SKAction sequence, then I add a new Prayer node to this scene. How is this possible. The following code is mine:

The code for the sequence is that I'm running on the Scansprinitode subclass (TEMissileNode): -

  SKAction * moveDown = [SKAction moveToY: Self.position.y - 20 Duration: 0.2]; SKAction * animation = [SKAction animateWithTextures: textures timePerFrame: time / 7]; SKAction * moveMissileProjectile = [SKAction Moving: Pointoffscreen Term: Time]; SKAction * group = [SKAction group: @ [animation, movement projectile]]; SKAction * Sequence = [SKAction Sequence: @ [Hilldown, Group, [SKAction removalFromParent]]]; [Self run action: sequence];   

From the main scene, I call those actions that execute these tasks

  TEMissileNode * missile = [tmissilenode missile point: CGPointMake (copter.position) .x + Copter.size.width / 2, copter.position.y - 20) Type: TEMissileTypeA]; [Self linking child: missile]; [Missile conduction status: position];   

What do I want to do is add another hair phantom node to the scene after the completion of the method (Move Status: Status), but how to get the full notification from the method.

There are two ways to call after the action is completed.

Use the complete block after the run operation.

  [Autofill: sequence complete: ^ {// Add relevant code here. }];   

Or, add another block to execute at the end of the sequence.

  SKAction * actionBlock = [SKAction runBlock: ^ {// Add relevant code here. }]; SKAction * sequence = [SKAction sequence: @ [SKAction removalFromParent], action block]];    

Comments

Popular posts from this blog

Matlab transpose a table vector -

c# - Textbox not clickable but editable -