ios - How create a Flip effect for SKSpriteNode in swift -
i want create flip effect in swift skspritenode effect. try solution before horizontal rotation can see vertical rotation. want horizontal rotation in example html/css.
solution flip skspritenode :
func fliptile(node : rectsprite){ let flip = skaction.scalexto(-1, duration: 0.4) node.setscale(1.0) var changecolor = skaction.runblock( { node.texture = sktexture(imagenamed: "blue")}) var action = skaction.sequence([flip, changecolor] ) node.runaction(action) }
Comments
Post a Comment