问题
I am extending my iOS game for tvOS. Most of the game controls are handled by touchesBegan
, touchesMoved
and touchesEnded
. All my select buttons are handled in the following way:
if button1.contains(location){
let gameplayScene = GamePlayScene(size: self.size)
self.view?.presentScene(gameplayScene)
}
if button2.contains(location){
let settingsScene = SettingsScene(size: self.size)
self.view?.presentScene(settingsScene)
}
if button3.contains(location){
let helpScene = HelpScene(size: self.size)
self.view?.presentScene(helpScene)
}
for an image below:
How can I appropriately highlight and select each one of these buttons in tvOS using the AppleTV remote?
来源:https://stackoverflow.com/questions/41561494/how-to-select-buttons-in-tvos-menu-for-spritekit-game