ios - SpriteKit moving Nodes faster with time -


I want to speed up the object over time, for example I found an object that was added every 1.5 seconds. is. This object is moving towards x = -100 with period = 5. After 30 seconds it should proceed faster.

  - (id) initWithSize: (CGSize) size {if (self = [super initWithSize: shape]) {..... SKAction * Spawn = [SKAction performSelector: @selector (enemy OnTarget: Self]; SKAction * Delay = [SKAction waitForDuration: 1.5]; SKAction * SpawnThenDelay = [SKAction sequence: @ [spawn, delay]]; SKAction * SpawnThenDelayForever = [SKAction repeatActionForever: SpawnThenDelay]; [Self run action: spontaneous daytime]; .....} - (Zero) Enemy {Enemy = [SKS Princenode spriteNodeWithImage Nominated: @ "Anime Page"]; Anime size = CGSizeMake (85, 85); Anime Jeepishan = 2; Enemy = name = @ "Annie"; Enemy.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize: CGSizeMake (50, 50)]; Enemy.physicsBody.dynamic = NO; Enemy.physicsBody.allowsRotation = No; Enemy.physicsBody.usesPreciseCollisionDetection = Yes; Enemy.physicsBody.restitution = 0; Enemy.physicsBody.categoryBitMask = EnemyCategory; Enemy.physicsBodyCollisionBitMask = StoneCategory; Enemy.physicsBody.contactTestBitMask = StoneCategory; Enemy.search = cp pointmake (auto.frame size.width * 1.25, self.fram.ize.height / 2.2); SKAction * actionMove = [SKAction HillToX: -100 Duration: 5]; SKAction * actionMoveDone = [SKAction removeFromParent]; [Enemy run action: [Sclation repeat anaccessaure: [SK section]: [[ActionMove, ActionMavadone]]]] ;; [Self combine: enemy]; }  

Each esion has the speed of one property and the speed of each action Runs at speed 1 so that you can increase the speed property AC in the position of your game


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -