Skip to content

Instantly share code, notes, and snippets.

@alcidesjunior
Created March 28, 2019 12:23
Show Gist options
  • Save alcidesjunior/8e91ce3f57c8803f656897ea7ba71ee4 to your computer and use it in GitHub Desktop.
Save alcidesjunior/8e91ce3f57c8803f656897ea7ba71ee4 to your computer and use it in GitHub Desktop.
//definindo o botão azul e suas propriedades
private lazy var redButton: SKShapeNode = {
//criando um botão retângulo
let btn = SKShapeNode(rectOf: CGSize(width: 70, height: 40))
//posicionando o botão
btn.position = CGPoint(x: 240, y: 60)
//definindo a cor para o botão
btn.fillColor = .red
//dando um nome ao botão
btn.name = "redButton"
return btn
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment