現在spritkitでゲームを作っているのですが
登場キャラクターをシュミュレーターで動かしてみようと思ったときに、"consecutive declarations on a line must be separated by "
が最後の段に表示されランできません。
今までアプリを作っているときも
たまにこのエラーは表示されていたのですが
気づかないうちに直ってたりします。
何か解決法はあるでしょうか?
import SpriteKit
class GameScene: SKScene {
struct Constants { static let PlayerImages = ["shrimp01","shrimp02","shrimp03","shrimp04","shrimp01","shrimp02","shrimp03","shrimp04"] func didMoveToView(view: SKView) { } /// プレイヤーを構築 func setupPlayer() { // Playerのパラパラアニメーション作成に必要なSKTextureクラスの配列を定義 var playerTexture = [SKTexture]() // パラパラアニメーションに必要な画像を読み込む for imageName in Constants.PlayerImages { let texture = SKTexture(imageNamed: imageName) texture.filteringMode = .Linear playerTexture.append(texture) } // キャラクターのアニメーションをパラパラ漫画のように切り替える let playerAnimation = SKAction.animateWithTextures(playerTexture, timePerFrame: 0.2) // パラパラアニメーションをループさせる let loopAnimation = SKAction.repeatActionForever(playerAnimation) func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { /* Called when a touch begins */ } func update(currentTime: CFTimeInterval) { /* Called before each frame is rendered */ }
}
func setupBackgroundSea() {
let texure = SKTexture(imageNamed: "background")
texure.filteringMode = .Nearest
}
}