gamechina/GrubbyWorm

How button

Closed this issue ยท 3 comments

Hello
I like that dev of the game great one ๐Ÿ‘
BTW the how button is not functioning ?

YES.

howButton.actionTouchUpInside = GWButtonTarget.aBlock({ () -> Void in
    print("click how")
})

later, I want to add some ui for telling people how to play.

hello
can you please tell me in which file is the howbutton configured.
Thank you

Still in the UISpriteComponent.swift file:

let howNormalTexture = SKTexture(imageNamed: "icon_how")
        howButton = GWButton(normalTexture: howNormalTexture)
        howButton.size = CGSizeMake(50, 50)
        howButton.position = playButton.position + CGPointMake(110, 0)
        howButton.zPosition = 2
        howButton.setRawPosition()
        howButton.setRawScale()
        root.addChild(howButton)
....
howButton.actionTouchUpInside = GWButtonTarget.aBlock({ () -> Void in
    print("click how")
})

only print now, no more function added, just a placeholder.