I'm making a litle game, and I need to have random columns runing from right to left. I'm using a switch statement. In each case I am adding a diferent child node, but it doesn't work.
All g1, g2.. here..
var y = true
do{
var x = arc4random_uniform(5)
switch x
{
case 1: addChild(g1); g1.runAction(moveremover)
case 2: addChild(g2); g2.runAction(moveremover)
default: SKAction.waitForDuration(2)
}
}
while y