last changes
This commit is contained in:
parent
74a7df551c
commit
7050fd1b8f
@ -26,13 +26,11 @@ class RoundCalculatorService {
|
|||||||
|
|
||||||
var numberOfAttacks = 0
|
var numberOfAttacks = 0
|
||||||
var numberOfOwnUnitMoves = 0
|
var numberOfOwnUnitMoves = 0
|
||||||
var roundNr = 1
|
|
||||||
|
|
||||||
func calculateRound() {
|
func calculateRound() {
|
||||||
StateManager.sharedInstance.stateMachine?.enter(SyncingState.self)
|
StateManager.sharedInstance.stateMachine?.enter(SyncingState.self)
|
||||||
os_log("Started calculating Round", log: RoundCalculatorService.LOG, type: .info)
|
os_log("Started calculating Round", log: RoundCalculatorService.LOG, type: .info)
|
||||||
|
|
||||||
roundNr += 1
|
|
||||||
isCalculating = true
|
isCalculating = true
|
||||||
let currentSnapshotModel = DataService.sharedInstance.snapshotModel
|
let currentSnapshotModel = DataService.sharedInstance.snapshotModel
|
||||||
var baseSpecificMoves = collectBaseSpecificMoves()
|
var baseSpecificMoves = collectBaseSpecificMoves()
|
||||||
|
@ -29,7 +29,7 @@ class GameState: GKState {
|
|||||||
os_log("Entered Game State", log: LOG, type: .info)
|
os_log("Entered Game State", log: LOG, type: .info)
|
||||||
if CommandLine.arguments.contains("--no-matchmaking") {
|
if CommandLine.arguments.contains("--no-matchmaking") {
|
||||||
StateManager.sharedInstance.menuSc!.loadScene(scene: GameScene(size: StateManager.sharedInstance.menuSc!.size))
|
StateManager.sharedInstance.menuSc!.loadScene(scene: GameScene(size: StateManager.sharedInstance.menuSc!.size))
|
||||||
} else if RoundCalculatorService.sharedInstance.roundNr == 1 {
|
} else if RoundCalculatorService.sharedInstance.currentRound == 1 {
|
||||||
StateManager.sharedInstance.menuSc!.loadScene(scene: StateManager.sharedInstance.gameSc!)
|
StateManager.sharedInstance.menuSc!.loadScene(scene: StateManager.sharedInstance.gameSc!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user