import SpriteKit
class GameScene: SKScene {
var movingGround: JTMovingGround!
var hero: JTHero
override func didMoveToView(view: SKView) {
backgroundColor = UIColor(red: 159.0/255.0, green: 281.0/255.0, blue: 244.0/255.0, alpha: 1.0)
movingGround = JTMovingGround(size: CGSizeMake(view.frame.width, 20))
movingGround.position = CGPointMake(0, view.frame.size.height/2)
addChild(movingGround)
hero = JTHero()
hero.position = CGPointMake(70, movingGround.position.y + movingGround.frame.size.height/2 + hero.frame.height/2)
addChild(hero)
}
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
movingGround.start()
}
override func update(currentTime: CFTimeInterval) {
/* Called before each frame is rendered */
}
}
qualcuno potrebbe dirmi cosa è andato storto ?? grazieContinua a dirmi "Class 'GameScene' non ha inizializzatori"
È necessario accettare una risposta se ha risolto il problema – Fogmeister