rest RoundCalculatorService
This commit is contained in:
parent
48e6247b69
commit
f363d30f15
@ -39,7 +39,7 @@ class Way: GKEntity {
|
|||||||
self.localWayComponent.strokeColor = UIColor(red: 0.852, green: 0.649, blue: 0.123, alpha: 1)
|
self.localWayComponent.strokeColor = UIColor(red: 0.852, green: 0.649, blue: 0.123, alpha: 1)
|
||||||
self.localWayComponent.lineWidth = 10
|
self.localWayComponent.lineWidth = 10
|
||||||
self.localWayComponent.zPosition = 0
|
self.localWayComponent.zPosition = 0
|
||||||
|
self.localWayComponent.name = "way"
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@ final class GameCenterManager: NSObject, GKMatchmakerViewControllerDelegate, GKG
|
|||||||
}
|
}
|
||||||
|
|
||||||
func reset(){
|
func reset(){
|
||||||
|
|
||||||
isMatchStarted = false
|
isMatchStarted = false
|
||||||
isServer = false
|
isServer = false
|
||||||
localPlayerRandomNumber = RandomNumber()
|
localPlayerRandomNumber = RandomNumber()
|
||||||
|
@ -11,7 +11,6 @@ import SpriteKit
|
|||||||
import GameplayKit
|
import GameplayKit
|
||||||
|
|
||||||
class GameViewController: UIViewController {
|
class GameViewController: UIViewController {
|
||||||
public static let sharedInstance = GameViewController();
|
|
||||||
var currentScene: SKView?
|
var currentScene: SKView?
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
@ -26,8 +26,6 @@ class GameScene: SKScene{
|
|||||||
entityManager.add(Background(size: self.size))
|
entityManager.add(Background(size: self.size))
|
||||||
if CommandLine.arguments.contains("--no-matchmaking") {
|
if CommandLine.arguments.contains("--no-matchmaking") {
|
||||||
_ = MapFactory(scene: self, entityManager: entityManager).load()
|
_ = MapFactory(scene: self, entityManager: entityManager).load()
|
||||||
// let node = ButtonNode(textureName: "yellow_button05", text: "Menu", isEnabled: true, position: CGPoint(x: self.size.width / 2, y: self.size.height / 2 - 200), onButtonPress: {self.view?.presentScene(MenuScene(size: self.size)) })
|
|
||||||
// self.addChild(node)
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -183,8 +181,10 @@ class GameScene: SKScene{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func buttonPressed() {
|
func buttonPressed() {
|
||||||
GameCenterManager.sharedInstance.reset();
|
GameCenterManager.sharedInstance.reset()
|
||||||
self.gameEndEffects = false
|
self.gameEndEffects = false
|
||||||
|
entityManager.getTimer()?.stopTimer()
|
||||||
|
RoundCalculatorService.sharedInstance.currentRound = 1
|
||||||
self.view?.presentScene(MenuScene(size: self.size))
|
self.view?.presentScene(MenuScene(size: self.size))
|
||||||
entityManager.entities.removeAll()
|
entityManager.entities.removeAll()
|
||||||
self.removeFromParent()
|
self.removeFromParent()
|
||||||
|
Loading…
Reference in New Issue
Block a user