我正在尝试在游戏菜单和第一级之间进行转换。但不是所有的Level1(它是通过使用Level1.sks文件(这里我设计了一个关卡)和Level1.swift(这里我已经创建了我的“英雄”等))在屏幕上出现的只是英雄,但没有在 Level1.sks 中设计的位置。
我该如何解决这个问题?
override func touchesEnded(touches: NSSet, withEvent event: UIEvent) {
for touch: AnyObject in touches {
let location = touch.locationInNode(self)
if (playbutton .containsPoint(location)){
runAction(SKAction.playSoundFileNamed("play.wav", waitForCompletion: false))
let transition = SKTransition.revealWithDirection(SKTransitionDirection.Down, duration: 1)
let scene = Level1(size: CGSizeMake(1024, 768))
scene.scaleMode = SKSceneScaleMode.AspectFill
self.scene?.view?.presentScene(scene, transition: transition)
transition.pausesOutgoingScene = true
}