Refine logo and buttons in MainScene
This commit is contained in:
parent
5d14a8bd56
commit
fca44f3072
23
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/Contents.json
vendored
Normal file
23
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "goldLettering.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "goldLettering-1.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "goldLettering-2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/goldLettering-1.png
vendored
Normal file
BIN
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/goldLettering-1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/goldLettering-2.png
vendored
Normal file
BIN
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/goldLettering-2.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/goldLettering.png
vendored
Normal file
BIN
GoldWars/GoldWars/Assets.xcassets/goldLettering.imageset/goldLettering.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
23
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/Contents.json
vendored
Normal file
23
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "warsLettering.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "warsLettering-1.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "warsLettering-2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/warsLettering-1.png
vendored
Normal file
BIN
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/warsLettering-1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
BIN
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/warsLettering-2.png
vendored
Normal file
BIN
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/warsLettering-2.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
BIN
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/warsLettering.png
vendored
Normal file
BIN
GoldWars/GoldWars/Assets.xcassets/warsLettering.imageset/warsLettering.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
@ -62,7 +62,8 @@ class EntityManager {
|
|||||||
|
|
||||||
if let spinningLogoEntity = entity as? SpinningLogoEntity {
|
if let spinningLogoEntity = entity as? SpinningLogoEntity {
|
||||||
scene.addChild(spinningLogoEntity.spinningLogoNode)
|
scene.addChild(spinningLogoEntity.spinningLogoNode)
|
||||||
scene.addChild(spinningLogoEntity.letteringNode)
|
scene.addChild(spinningLogoEntity.goldLetteringNode)
|
||||||
|
scene.addChild(spinningLogoEntity.warsLetteringNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let wayEntity = entity as? Way {
|
if let wayEntity = entity as? Way {
|
||||||
|
@ -12,19 +12,26 @@ import GameplayKit
|
|||||||
class SpinningLogoEntity: GKEntity {
|
class SpinningLogoEntity: GKEntity {
|
||||||
|
|
||||||
let spinningLogoNode : SpinningLogo3DNode
|
let spinningLogoNode : SpinningLogo3DNode
|
||||||
let letteringNode : SKSpriteNode
|
let goldLetteringNode : SKSpriteNode
|
||||||
|
let warsLetteringNode : SKSpriteNode
|
||||||
|
|
||||||
init(sceneSize size: CGSize) {
|
init(sceneSize size: CGSize) {
|
||||||
spinningLogoNode = SpinningLogo3DNode()
|
spinningLogoNode = SpinningLogo3DNode()
|
||||||
let midX = size.width / 2
|
let midX = size.width / 2
|
||||||
let midY = size.height / 2
|
let midY = size.height / 2
|
||||||
|
goldLetteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "goldLettering"))
|
||||||
|
goldLetteringNode.position = CGPoint(x: midX, y: midY);
|
||||||
|
goldLetteringNode.size = CGSize(width: 675, height: 284)
|
||||||
|
goldLetteringNode.position = CGPoint(x: midX , y: midY + 280);
|
||||||
|
goldLetteringNode.size = CGSize(width: 675, height: 284)
|
||||||
|
|
||||||
|
warsLetteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "warsLettering"))
|
||||||
|
warsLetteringNode.position = CGPoint(x: midX, y: midY - 300);
|
||||||
|
warsLetteringNode.size = CGSize(width: 700, height: 284)
|
||||||
|
|
||||||
letteringNode = SKSpriteNode(texture: SKTexture(imageNamed: "goldWarsLettering"))
|
|
||||||
letteringNode.position = CGPoint(x: midX, y: midY);
|
|
||||||
letteringNode.size = CGSize(width: 723, height: 590)
|
|
||||||
spinningLogoNode.viewportSize = CGSize(width: 200, height: 200)
|
spinningLogoNode.viewportSize = CGSize(width: 200, height: 200)
|
||||||
spinningLogoNode.zPosition = letteringNode.zPosition - 1
|
spinningLogoNode.zPosition = goldLetteringNode.zPosition - 1
|
||||||
spinningLogoNode.position = CGPoint(x: midX - 80, y: midY + 160);
|
spinningLogoNode.position = CGPoint(x: midX - 65, y: midY + 285);
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ class MenuScene: SKScene {
|
|||||||
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),
|
position: CGPoint(x: midX, y: midY + 90),
|
||||||
onButtonPress: {
|
onButtonPress: {
|
||||||
if CommandLine.arguments.contains("--no-matchmaking") {
|
if CommandLine.arguments.contains("--no-matchmaking") {
|
||||||
self.loadScene(scene: GameScene(size: self.size))
|
self.loadScene(scene: GameScene(size: self.size))
|
||||||
@ -37,7 +37,7 @@ class MenuScene: SKScene {
|
|||||||
entityManager.add(Button(name: "settingsButton",
|
entityManager.add(Button(name: "settingsButton",
|
||||||
textureName: "gold_button_3",
|
textureName: "gold_button_3",
|
||||||
text: "Settings",
|
text: "Settings",
|
||||||
position: CGPoint(x: midX, y: midY - 80 ),
|
position: CGPoint(x: midX, y: midY ),
|
||||||
onButtonPress: {
|
onButtonPress: {
|
||||||
let scene = SettingsScene(size: self.size)
|
let scene = SettingsScene(size: self.size)
|
||||||
self.loadScene(scene: scene)
|
self.loadScene(scene: scene)
|
||||||
@ -45,7 +45,7 @@ class MenuScene: SKScene {
|
|||||||
entityManager.add(Button(name: "gameCenterButton",
|
entityManager.add(Button(name: "gameCenterButton",
|
||||||
textureName: "gold_button_3",
|
textureName: "gold_button_3",
|
||||||
text: "GameCenter",
|
text: "GameCenter",
|
||||||
position: CGPoint(x: midX, y: midY - 160),
|
position: CGPoint(x: midX, y: midY - 90),
|
||||||
onButtonPress: {
|
onButtonPress: {
|
||||||
if GameCenterManager.isAuthenticated {
|
if GameCenterManager.isAuthenticated {
|
||||||
GameCenterManager.sharedInstance.presentGameCenter()
|
GameCenterManager.sharedInstance.presentGameCenter()
|
||||||
|
Loading…
Reference in New Issue
Block a user