rest RoundCalculatorService

This commit is contained in:
Niko Jochim 2020-06-14 20:19:04 +02:00
parent 48e6247b69
commit f363d30f15
4 changed files with 4 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class Way: GKEntity {
self.localWayComponent.strokeColor = UIColor(red: 0.852, green: 0.649, blue: 0.123, alpha: 1)
self.localWayComponent.lineWidth = 10
self.localWayComponent.zPosition = 0
self.localWayComponent.name = "way"
super.init()
}

View File

@ -59,7 +59,6 @@ final class GameCenterManager: NSObject, GKMatchmakerViewControllerDelegate, GKG
}
func reset(){
isMatchStarted = false
isServer = false
localPlayerRandomNumber = RandomNumber()

View File

@ -11,7 +11,6 @@ import SpriteKit
import GameplayKit
class GameViewController: UIViewController {
public static let sharedInstance = GameViewController();
var currentScene: SKView?
override func viewDidLoad() {

View File

@ -26,8 +26,6 @@ class GameScene: SKScene{
entityManager.add(Background(size: self.size))
if CommandLine.arguments.contains("--no-matchmaking") {
_ = 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
}
@ -183,8 +181,10 @@ class GameScene: SKScene{
}
func buttonPressed() {
GameCenterManager.sharedInstance.reset();
GameCenterManager.sharedInstance.reset()
self.gameEndEffects = false
entityManager.getTimer()?.stopTimer()
RoundCalculatorService.sharedInstance.currentRound = 1
self.view?.presentScene(MenuScene(size: self.size))
entityManager.entities.removeAll()
self.removeFromParent()