added GameState
This commit is contained in:
parent
50fa1b6cc6
commit
ce2d847393
@ -50,6 +50,7 @@
|
||||
AE6BB1C224807AC00063ECAE /* StateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C124807AC00063ECAE /* StateManager.swift */; };
|
||||
AE6BB1C424807C490063ECAE /* MenuState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C324807C490063ECAE /* MenuState.swift */; };
|
||||
AE6BB1C624807CDA0063ECAE /* SyncingState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C524807CDA0063ECAE /* SyncingState.swift */; };
|
||||
AE6BB1C824807E6A0063ECAE /* GameState.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6BB1C724807E6A0063ECAE /* GameState.swift */; };
|
||||
C04783EE2468583F004961FB /* intro-music.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C04783ED2468583F004961FB /* intro-music.mp3 */; };
|
||||
C04783F024685995004961FB /* SettingsScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04783EF24685995004961FB /* SettingsScene.swift */; };
|
||||
C05BB9C4247D890C00411249 /* SliderComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05BB9C3247D890C00411249 /* SliderComponent.swift */; };
|
||||
@ -119,6 +120,7 @@
|
||||
AE6BB1C124807AC00063ECAE /* StateManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StateManager.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>"; };
|
||||
AE6BB1C724807E6A0063ECAE /* GameState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameState.swift; 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>"; };
|
||||
C05BB9C3247D890C00411249 /* SliderComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliderComponent.swift; sourceTree = "<group>"; };
|
||||
@ -194,6 +196,7 @@
|
||||
AE6BB1C124807AC00063ECAE /* StateManager.swift */,
|
||||
AE6BB1C324807C490063ECAE /* MenuState.swift */,
|
||||
AE6BB1C524807CDA0063ECAE /* SyncingState.swift */,
|
||||
AE6BB1C724807E6A0063ECAE /* GameState.swift */,
|
||||
);
|
||||
path = GoldWars;
|
||||
sourceTree = "<group>";
|
||||
@ -421,6 +424,7 @@
|
||||
AE6BB1C624807CDA0063ECAE /* SyncingState.swift in Sources */,
|
||||
9EEDE02D246FCD770096C735 /* SpinningLogoEntity.swift in Sources */,
|
||||
AE6BB1C224807AC00063ECAE /* StateManager.swift in Sources */,
|
||||
AE6BB1C824807E6A0063ECAE /* GameState.swift in Sources */,
|
||||
9E174C86245DD91500209FF0 /* ButtonComponent.swift in Sources */,
|
||||
11036113244B3E30008610AF /* MenuScene.swift in Sources */,
|
||||
C099579C246C5E5C0016AA22 /* DataService.swift in Sources */,
|
||||
|
29
GoldWars/GoldWars/GameState.swift
Normal file
29
GoldWars/GoldWars/GameState.swift
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// GameState.swift
|
||||
// GoldWars
|
||||
//
|
||||
// Created by Chauntalle Schüle on 29.05.20.
|
||||
// Copyright © 2020 SP2. All rights reserved.
|
||||
//
|
||||
|
||||
import GameKit
|
||||
import os
|
||||
|
||||
class GameState: GKState {
|
||||
|
||||
let LOG = OSLog.init(subsystem: "GameState", category: "GameState")
|
||||
|
||||
override func isValidNextState(_ stateClass: AnyClass) -> Bool {
|
||||
return stateClass is SyncingState.Type
|
||||
}
|
||||
|
||||
override func didEnter(from previousState: GKState?) {
|
||||
os_log("Entered Game State", log: LOG, type: .info)
|
||||
}
|
||||
|
||||
override func update(deltaTime seconds: TimeInterval) {
|
||||
}
|
||||
|
||||
override func willExit(to nextState: GKState) {
|
||||
}
|
||||
}
|
@ -16,22 +16,6 @@ enum StateTypes {
|
||||
case endGameSt
|
||||
}
|
||||
|
||||
class GameState: GKState {
|
||||
let LOG = OSLog.init(subsystem: "GameState", category: "GameState")
|
||||
|
||||
override func isValidNextState(_ stateClass: AnyClass) -> Bool {
|
||||
return stateClass is SyncingState.Type
|
||||
}
|
||||
|
||||
override func didEnter(from previousState: GKState?) {
|
||||
os_log("Entered Game State", log: LOG, type: .info)
|
||||
}
|
||||
override func update(deltaTime seconds: TimeInterval) {
|
||||
}
|
||||
override func willExit(to nextState: GKState) {
|
||||
}
|
||||
}
|
||||
|
||||
class EndGameState: GKState {
|
||||
|
||||
let LOG = OSLog.init(subsystem: "EndGameState", category: "EndGameState")
|
||||
|
Loading…
Reference in New Issue
Block a user