当我转换到一个新场景时,该场景不再有效(一个过渡了)!

时间:2016-08-13 05:02:00

标签: ios swift sprite-kit

这是我的代码......从触摸开始!

if nodeITapped.name == "leftButton" {
    leftb.alpha = 0.5
    let fadeInAction = SKAction.fadeOutWithDuration(1)
    leftb.runAction(fadeInAction)
    let sceneToMoveTo = MainScene(size: self.size)
    sceneToMoveTo.scaleMode = self.scaleMode
    let myTransition = SKTransition.fadeWithDuration(2)
    self.view!.presentScene(sceneToMoveTo, transition: myTransition)
}

0 个答案:

没有答案