Background add

This commit is contained in:
Ömer Özel 2020-04-22 16:22:06 +02:00 committed by Ömer Özel
parent 63e0336413
commit dffcb320b2
6 changed files with 31 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 KiB

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Backgorund.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Background@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Background@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -36,6 +36,14 @@ class GameScene: SKScene {
} }
} }
override func didMove(to view: SKView) {
let background = SKSpriteNode(imageNamed: "Background")
background.position = CGPoint(x: self.size.width / 2, y: self.size.height / 2)
background.zPosition = -1
background.size = self.size
self.addChild(background)
}
func touchDown(atPoint pos : CGPoint) { func touchDown(atPoint pos : CGPoint) {

View File

@ -38,8 +38,6 @@
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>