added EndGameState, deleted imports from enum StateTypes
This commit is contained in:
parent
ce2d847393
commit
6be5325d86
@ -51,6 +51,7 @@
|
|||||||
AE6BB1C424807C490063ECAE /* MenuState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C324807C490063ECAE /* MenuState.swift */; };
|
AE6BB1C424807C490063ECAE /* MenuState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C324807C490063ECAE /* MenuState.swift */; };
|
||||||
AE6BB1C624807CDA0063ECAE /* SyncingState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C524807CDA0063ECAE /* SyncingState.swift */; };
|
AE6BB1C624807CDA0063ECAE /* SyncingState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C524807CDA0063ECAE /* SyncingState.swift */; };
|
||||||
AE6BB1C824807E6A0063ECAE /* GameState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C724807E6A0063ECAE /* GameState.swift */; };
|
AE6BB1C824807E6A0063ECAE /* GameState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C724807E6A0063ECAE /* GameState.swift */; };
|
||||||
|
AE6BB1CA24807FDB0063ECAE /* EndGameState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C924807FDB0063ECAE /* EndGameState.swift */; };
|
||||||
C04783EE2468583F004961FB /* intro-music.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C04783ED2468583F004961FB /* intro-music.mp3 */; };
|
C04783EE2468583F004961FB /* intro-music.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C04783ED2468583F004961FB /* intro-music.mp3 */; };
|
||||||
C04783F024685995004961FB /* SettingsScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04783EF24685995004961FB /* SettingsScene.swift */; };
|
C04783F024685995004961FB /* SettingsScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04783EF24685995004961FB /* SettingsScene.swift */; };
|
||||||
C05BB9C4247D890C00411249 /* SliderComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05BB9C3247D890C00411249 /* SliderComponent.swift */; };
|
C05BB9C4247D890C00411249 /* SliderComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05BB9C3247D890C00411249 /* SliderComponent.swift */; };
|
||||||
@ -121,6 +122,7 @@
|
|||||||
AE6BB1C324807C490063ECAE /* MenuState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuState.swift; sourceTree = "<group>"; };
|
AE6BB1C324807C490063ECAE /* MenuState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuState.swift; sourceTree = "<group>"; };
|
||||||
AE6BB1C524807CDA0063ECAE /* SyncingState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncingState.swift; sourceTree = "<group>"; };
|
AE6BB1C524807CDA0063ECAE /* SyncingState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncingState.swift; sourceTree = "<group>"; };
|
||||||
AE6BB1C724807E6A0063ECAE /* GameState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameState.swift; sourceTree = "<group>"; };
|
AE6BB1C724807E6A0063ECAE /* GameState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameState.swift; sourceTree = "<group>"; };
|
||||||
|
AE6BB1C924807FDB0063ECAE /* EndGameState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndGameState.swift; sourceTree = "<group>"; };
|
||||||
C04783ED2468583F004961FB /* intro-music.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "intro-music.mp3"; sourceTree = "<group>"; };
|
C04783ED2468583F004961FB /* intro-music.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "intro-music.mp3"; sourceTree = "<group>"; };
|
||||||
C04783EF24685995004961FB /* SettingsScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScene.swift; sourceTree = "<group>"; };
|
C04783EF24685995004961FB /* SettingsScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScene.swift; sourceTree = "<group>"; };
|
||||||
C05BB9C3247D890C00411249 /* SliderComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliderComponent.swift; sourceTree = "<group>"; };
|
C05BB9C3247D890C00411249 /* SliderComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliderComponent.swift; sourceTree = "<group>"; };
|
||||||
@ -197,6 +199,7 @@
|
|||||||
AE6BB1C324807C490063ECAE /* MenuState.swift */,
|
AE6BB1C324807C490063ECAE /* MenuState.swift */,
|
||||||
AE6BB1C524807CDA0063ECAE /* SyncingState.swift */,
|
AE6BB1C524807CDA0063ECAE /* SyncingState.swift */,
|
||||||
AE6BB1C724807E6A0063ECAE /* GameState.swift */,
|
AE6BB1C724807E6A0063ECAE /* GameState.swift */,
|
||||||
|
AE6BB1C924807FDB0063ECAE /* EndGameState.swift */,
|
||||||
);
|
);
|
||||||
path = GoldWars;
|
path = GoldWars;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -410,6 +413,8 @@
|
|||||||
3FE19DB5246C7A22004827AB /* RoundCalculatorService.swift in Sources */,
|
3FE19DB5246C7A22004827AB /* RoundCalculatorService.swift in Sources */,
|
||||||
9EC239E1246878A900952F74 /* MultiplayerNetwork.swift in Sources */,
|
9EC239E1246878A900952F74 /* MultiplayerNetwork.swift in Sources */,
|
||||||
9EA3ABEB245C6DFA006BC61D /* BaseNode.swift in Sources */,
|
9EA3ABEB245C6DFA006BC61D /* BaseNode.swift in Sources */,
|
||||||
|
AE6BB1CA24807FDB0063ECAE /* EndGameState.swift in Sources */,
|
||||||
|
9E04AFAF245E2B73002D5CFC /* AttackActionComponent.swift in Sources */,
|
||||||
3E6785422472CBEC007B9DE4 /* Way.swift in Sources */,
|
3E6785422472CBEC007B9DE4 /* Way.swift in Sources */,
|
||||||
110360D9244B101A008610AF /* GameScene.swift in Sources */,
|
110360D9244B101A008610AF /* GameScene.swift in Sources */,
|
||||||
C04783F024685995004961FB /* SettingsScene.swift in Sources */,
|
C04783F024685995004961FB /* SettingsScene.swift in Sources */,
|
||||||
|
29
GoldWars/GoldWars/EndGameState.swift
Normal file
29
GoldWars/GoldWars/EndGameState.swift
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// EndGameState.swift
|
||||||
|
// GoldWars
|
||||||
|
//
|
||||||
|
// Created by Chauntalle Schüle on 29.05.20.
|
||||||
|
// Copyright © 2020 SP2. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import GameKit
|
||||||
|
import os
|
||||||
|
|
||||||
|
class EndGameState: GKState {
|
||||||
|
|
||||||
|
let LOG = OSLog.init(subsystem: "EndGameState", category: "EndGameState")
|
||||||
|
|
||||||
|
override func isValidNextState(_ stateClass: AnyClass) -> Bool {
|
||||||
|
return stateClass is MenuState.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
override func update(deltaTime seconds: TimeInterval) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override func didEnter(from previousState: GKState?) {
|
||||||
|
os_log("Entered EndGame State", log: LOG, type: .info)
|
||||||
|
}
|
||||||
|
|
||||||
|
override func willExit(to nextState: GKState) {
|
||||||
|
}
|
||||||
|
}
|
@ -6,31 +6,9 @@
|
|||||||
// Copyright © 2020 SP2. All rights reserved.
|
// Copyright © 2020 SP2. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import GameKit
|
|
||||||
import os
|
|
||||||
|
|
||||||
enum StateTypes {
|
enum StateTypes {
|
||||||
case menuSt
|
case menuSt
|
||||||
case syncingSt
|
case syncingSt
|
||||||
case gameSt
|
case gameSt
|
||||||
case endGameSt
|
case endGameSt
|
||||||
}
|
}
|
||||||
|
|
||||||
class EndGameState: GKState {
|
|
||||||
|
|
||||||
let LOG = OSLog.init(subsystem: "EndGameState", category: "EndGameState")
|
|
||||||
|
|
||||||
override func isValidNextState(_ stateClass: AnyClass) -> Bool {
|
|
||||||
return stateClass is MenuState.Type
|
|
||||||
}
|
|
||||||
|
|
||||||
override func update(deltaTime seconds: TimeInterval) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override func didEnter(from previousState: GKState?) {
|
|
||||||
os_log("Entered EndGame State", log: LOG, type: .info)
|
|
||||||
}
|
|
||||||
|
|
||||||
override func willExit(to nextState: GKState) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user