Merge branch '114-adjust-menu-scene-for-smaller-ipads' into 'development'
Resolve "Adjust menu scene for smaller iPads" Closes #114 See merge request marcel.schwarz/software-projekt-2!141
This commit is contained in:
commit
6cfd91b659
@ -16,22 +16,19 @@ class SpinningLogoEntity: GKEntity {
|
|||||||
let warsLetteringNode: SKSpriteNode
|
let warsLetteringNode: SKSpriteNode
|
||||||
|
|
||||||
init(sceneSize size: CGSize) {
|
init(sceneSize size: CGSize) {
|
||||||
spinningLogoNode = SpinningLogo3DNode()
|
|
||||||
let midX = size.width / 2
|
|
||||||
let midY = size.height / 2
|
|
||||||
goldLetteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "goldLettering"))
|
goldLetteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "goldLettering"))
|
||||||
goldLetteringNode.position = CGPoint(x: midX, y: midY);
|
goldLetteringNode.position = CGPoint(x: size.width / 2 , y: size.height * 0.83)
|
||||||
goldLetteringNode.size = CGSize(width: 675, height: 284)
|
goldLetteringNode.size = CGSize(width: size.width / 2.02, height: size.height / 3.6)
|
||||||
goldLetteringNode.position = CGPoint(x: midX , y: midY + 280);
|
|
||||||
goldLetteringNode.size = CGSize(width: 675, height: 284)
|
|
||||||
|
|
||||||
warsLetteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "warsLettering"))
|
warsLetteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "warsLettering"))
|
||||||
warsLetteringNode.position = CGPoint(x: midX, y: midY - 300);
|
warsLetteringNode.position = CGPoint(x: size.width / 2, y: size.height * 0.17)
|
||||||
warsLetteringNode.size = CGSize(width: 700, height: 284)
|
warsLetteringNode.size = CGSize(width: size.width / 2.02, height: size.height / 3.6)
|
||||||
|
|
||||||
spinningLogoNode.viewportSize = CGSize(width: 200, height: 200)
|
spinningLogoNode = SpinningLogo3DNode()
|
||||||
|
spinningLogoNode.viewportSize = CGSize(width: size.width / 5.12 * 0.69, height: size.height / 3.84 * 0.69)
|
||||||
spinningLogoNode.zPosition = goldLetteringNode.zPosition - 1
|
spinningLogoNode.zPosition = goldLetteringNode.zPosition - 1
|
||||||
spinningLogoNode.position = CGPoint(x: midX - 65, y: midY + 285);
|
spinningLogoNode.position = CGPoint(x: size.width * 0.455, y: size.height * 0.83)
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@ class MenuScene: SKScene {
|
|||||||
entityManager.setScene(scene: self)
|
entityManager.setScene(scene: self)
|
||||||
let midX = self.size.width / 2
|
let midX = self.size.width / 2
|
||||||
let midY = self.size.height / 2
|
let midY = self.size.height / 2
|
||||||
entityManager.add(Button(name: "startGameButton",
|
entityManager.add(
|
||||||
|
Button(name: "startGameButton",
|
||||||
textureName: "gold_button_3",
|
textureName: "gold_button_3",
|
||||||
text: "Start Game",
|
text: "Start Game",
|
||||||
position: CGPoint(x: midX, y: midY + 90),
|
position: CGPoint(x: midX, y: midY + 90),
|
||||||
@ -26,23 +27,25 @@ class MenuScene: SKScene {
|
|||||||
self.loadScene(scene: GameScene(size: self.size))
|
self.loadScene(scene: GameScene(size: self.size))
|
||||||
SoundManager.sharedInstance.stopMenuMusic()
|
SoundManager.sharedInstance.stopMenuMusic()
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if GameCenterManager.isAuthenticated {
|
if GameCenterManager.isAuthenticated {
|
||||||
GameCenterManager.sharedInstance.presentMatchmaker()
|
GameCenterManager.sharedInstance.presentMatchmaker()
|
||||||
} else {
|
} else {
|
||||||
GameCenterManager.sharedInstance.authUser()
|
GameCenterManager.sharedInstance.authUser()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}))
|
}
|
||||||
entityManager.add(Button(name: "settingsButton",
|
)
|
||||||
|
)
|
||||||
|
entityManager.add(
|
||||||
|
Button(name: "settingsButton",
|
||||||
textureName: "gold_button_3",
|
textureName: "gold_button_3",
|
||||||
text: "Einstellungen",
|
text: "Einstellungen",
|
||||||
position: CGPoint(x: midX, y: midY ),
|
position: CGPoint(x: midX, y: midY ),
|
||||||
onButtonPress: {
|
onButtonPress: { self.loadScene(scene: SettingsScene(size: self.size))}
|
||||||
let scene = SettingsScene(size: self.size)
|
)
|
||||||
self.loadScene(scene: scene)
|
)
|
||||||
}))
|
entityManager.add(
|
||||||
entityManager.add(Button(name: "gameCenterButton",
|
Button(name: "gameCenterButton",
|
||||||
textureName: "gold_button_3",
|
textureName: "gold_button_3",
|
||||||
text: "GameCenter",
|
text: "GameCenter",
|
||||||
position: CGPoint(x: midX, y: midY - 90),
|
position: CGPoint(x: midX, y: midY - 90),
|
||||||
@ -52,15 +55,17 @@ class MenuScene: SKScene {
|
|||||||
} else {
|
} else {
|
||||||
GameCenterManager.sharedInstance.authUser()
|
GameCenterManager.sharedInstance.authUser()
|
||||||
}
|
}
|
||||||
}))
|
}
|
||||||
entityManager.add(Button(name: "regelwerkButton",
|
)
|
||||||
|
)
|
||||||
|
entityManager.add(
|
||||||
|
Button(name: "regelwerkButton",
|
||||||
textureName: "questionmark",
|
textureName: "questionmark",
|
||||||
text: "",
|
text: "",
|
||||||
position: CGPoint(x: self.size.width - 50, y: self.size.height - 50),
|
position: CGPoint(x: self.size.width - 50, y: self.size.height - 50),
|
||||||
onButtonPress: {
|
onButtonPress: { self.loadScene(scene: RulesScene(size: self.size)) }
|
||||||
let scene = RulesScene(size: self.size)
|
)
|
||||||
self.loadScene(scene: scene)
|
)
|
||||||
}))
|
|
||||||
entityManager.add(Background(size: self.size))
|
entityManager.add(Background(size: self.size))
|
||||||
entityManager.add(SpinningLogoEntity(sceneSize: self.size))
|
entityManager.add(SpinningLogoEntity(sceneSize: self.size))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user