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 */
}
}
ai đó có thể cho tôi biết điều gì đã xảy ra ?? nhờNó tiếp tục nói với tôi "Lớp 'GameScene' không có bộ khởi tạo"
Bạn cần chấp nhận câu trả lời nếu giải quyết được sự cố của bạn – Fogmeister