'''import SpriteKit
class GameScene: SKScene {
var HomeBackGround = SKSpriteNode() override func didMove(to view: SKView) { HomeBackGround = SKSpriteNode(imageNamed: "HomeBackGround") HomeBackGround.position = CGPoint(x: self.frame.width/2, y: self.frame.height/2) self.addChild("HomeBackGround") }
}'''
この中で'self.addChild(HomeBackGround)'とするとその部分にcannot convert value of type 'UImage' to expected argument type 'SKNode' というエラーが起こってシミレーターがビルドできません。このエラーの解決策をご教授願います。
回答1件
あなたの回答
tips
プレビュー