ios - Falling objects in SpriteKit? -


i have 20 different sprites. want "flow" of them falling top , disappearing when reach bottom. essentially, imagine rain each drop random sprite. want each sprite fall random rotation , each "drop" random sprite selection of 20.

can please point me in right direction? i've never made game before , first time working spritekit. i'm using swift way. thanks!

make use of arc4random random sprite selection of 20 sprites adding sprites group. arc4random able random rotation you.

for them fall down top bottom, can apply -gravity them or apply -impulse.

to check whether have reached bottom, y value when disappear off bottom of screen , use comparision value , use removefromparent().

alternatively third method use movement of skaction , adjust y coordinate. @ end of completion block use removefromparent().


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -