ios - Running actions in sequence SpriteKit -


in ios app i'm trying animate distribution of cards of players. however, when try run action sequence, none of cards move. doing wrong?

    override func didmovetoview(view: skview) {     /* setup scene here */     var actions = [skaction]()     let cards = makedeck()     c in cards {         let card = card(key: c)         card.position = cgpointmake(300, 300)         addchild(card)         actions.append(skaction.moveto(givecardtoplayer(cards.indexof(c)!), duration: 2.0))     }     self.runaction(skaction.sequence(actions)) } 

change

self.runaction(skaction.sequence(actions)) 

to

cards.runaction(skaction.sequence(actions)) 

currently, running sequence of actions on scene rather cards.

without seeing of other code i'd assume correct, if doesn't suggest posting code givecardtoplayer


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -