swift2 - How do I delete a SKSpriteNode? -
i have figured out how create skspritenode when touch screen using touchesbegan method or touchesmoves method in xcode. what figure out how delete 1 node created when lift finger off screen.
touchesbegan , touchesended methods of skscene called asynchronously. must hold sprite object create in touchesbegan in variable belonging skscene can still access when touchesended called.
if have done that, removefromparent should work, why not set hidden , reuse same sprite next time user touches screen.
Comments
Post a Comment