ios - How to make a view scrollable to view the full scene with sprites with Swift and SpriteKit? -
i have scene fills in view:
scene.size = skview.bounds.size scene.scalemode = .aspectfill
i fill in scene sprites bottom top , in need go further - outside view.
so scene should have same width view height should be... around 3000 fixed.
sprite fill in screen , want scroll able view whole scene.
would please give me advice on how "construct" that?
here quick road map:
- in game scene "didmovetoview" want make "world" node. make sure "world" node global variable declaring outside of class. make "world" node size large full size needed (e.g., 3000).
- also in "didmovetoview" add pinch gesture allow "zoom" world, using uipinchgesturerecognizer
- make function handle pinch. ultimately, "recognizer.scale" should influence "world.scale"
- all sprites should added "world" node
Comments
Post a Comment