Hello! Help a newbie ... We have one object. For example:
var ball = SKSpriteNode() ball = SKSpriteNode(imageNamed: "ball") ball.size = CGSize(какой-то размер) ball.zPosition = 5 addChild(ball)
Please, tell me how to make a constructor for this object? It is necessary that this object be copied and appear in one of the random positions (which were previously specified). I would also like to set the time interval with which new objects will appear. How to do in theory of course I imagine. But I can't figure out the code myself (((