Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions FullStackCodingBot/FullStackCodingBot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
710D0D422693EA3200244A16 /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710D0D412693EA3200244A16 /* GameViewController.swift */; };
710D0D442693EA6900244A16 /* GameViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710D0D432693EA6900244A16 /* GameViewModel.swift */; };
710D0D4F2693F6E500244A16 /* ItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 710D0D4D2693F6E500244A16 /* ItemCell.swift */; };
7123C74026FD79A70049E6DC /* AlertScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7123C73F26FD79A70049E6DC /* AlertScene.swift */; };
712F500A26A831D900186948 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 712F500926A831D900186948 /* GoogleService-Info.plist */; };
712F500B26A831D900186948 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 712F500926A831D900186948 /* GoogleService-Info.plist */; };
71307A8926A529F400C3191F /* LevelUpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71307A8826A529F400C3191F /* LevelUpButton.swift */; };
Expand Down Expand Up @@ -40,6 +41,10 @@
718F224926C377B700B2648C /* ErrorManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 718F224826C377B700B2648C /* ErrorManager.swift */; };
719A6A9B26B11208006AC991 /* NetworkDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 719A6A9A26B11208006AC991 /* NetworkDTO.swift */; };
719AB9DE26B7ADF2001B5913 /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 719AB9DD26B7ADF2001B5913 /* SettingViewController.swift */; };
719D0D9026F1863200913BBE /* MainScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 719D0D8F26F1863200913BBE /* MainScene.swift */; };
719D0D9226F186F100913BBE /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 719D0D9126F186F100913BBE /* GameScene.swift */; };
719D0D9426F1875100913BBE /* GameHelperScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 719D0D9326F1875100913BBE /* GameHelperScene.swift */; };
719D0D9626F1889700913BBE /* SceneType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 719D0D9526F1889700913BBE /* SceneType.swift */; };
719DA2B126A7FC9900624C61 /* JoystixMonospace-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 719DA2B026A7FC9800624C61 /* JoystixMonospace-Regular.ttf */; };
71A5518026A91C280083A4B0 /* FirebaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71A5517F26A91C280083A4B0 /* FirebaseManager.swift */; };
71A5518226A9277C0083A4B0 /* FirebaseManagerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71A5518126A9277C0083A4B0 /* FirebaseManagerType.swift */; };
Expand All @@ -48,7 +53,6 @@
71DF64BD2692C18F00557693 /* RankViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF64BC2692C18F00557693 /* RankViewController.swift */; };
71DF64BF2692C1C600557693 /* ItemViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF64BE2692C1C600557693 /* ItemViewController.swift */; };
71DF653C2692F90100557693 /* TransitionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF653B2692F90100557693 /* TransitionModel.swift */; };
71DF653E2692F92700557693 /* Scene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF653D2692F92700557693 /* Scene.swift */; };
71DF65412692F94E00557693 /* MainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF65402692F94E00557693 /* MainViewModel.swift */; };
71DF65432692F95800557693 /* ShopViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF65422692F95800557693 /* ShopViewModel.swift */; };
71DF65472692F97000557693 /* RankViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71DF65462692F97000557693 /* RankViewModel.swift */; };
Expand Down Expand Up @@ -168,6 +172,7 @@
710D0D412693EA3200244A16 /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = "<group>"; };
710D0D432693EA6900244A16 /* GameViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewModel.swift; sourceTree = "<group>"; };
710D0D4D2693F6E500244A16 /* ItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemCell.swift; sourceTree = "<group>"; };
7123C73F26FD79A70049E6DC /* AlertScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertScene.swift; sourceTree = "<group>"; };
712F500926A831D900186948 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
71307A8826A529F400C3191F /* LevelUpButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LevelUpButton.swift; sourceTree = "<group>"; };
71307A8A26A52A1F00C3191F /* LevelUpButton.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LevelUpButton.xib; sourceTree = "<group>"; };
Expand All @@ -194,6 +199,10 @@
718F224826C377B700B2648C /* ErrorManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorManager.swift; sourceTree = "<group>"; };
719A6A9A26B11208006AC991 /* NetworkDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkDTO.swift; sourceTree = "<group>"; };
719AB9DD26B7ADF2001B5913 /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = "<group>"; };
719D0D8F26F1863200913BBE /* MainScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainScene.swift; sourceTree = "<group>"; };
719D0D9126F186F100913BBE /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = "<group>"; };
719D0D9326F1875100913BBE /* GameHelperScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameHelperScene.swift; sourceTree = "<group>"; };
719D0D9526F1889700913BBE /* SceneType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneType.swift; sourceTree = "<group>"; };
719DA2B026A7FC9800624C61 /* JoystixMonospace-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "JoystixMonospace-Regular.ttf"; sourceTree = "<group>"; };
71A5517F26A91C280083A4B0 /* FirebaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseManager.swift; sourceTree = "<group>"; };
71A5518126A9277C0083A4B0 /* FirebaseManagerType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseManagerType.swift; sourceTree = "<group>"; };
Expand All @@ -202,7 +211,6 @@
71DF64BC2692C18F00557693 /* RankViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankViewController.swift; sourceTree = "<group>"; };
71DF64BE2692C1C600557693 /* ItemViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemViewController.swift; sourceTree = "<group>"; };
71DF653B2692F90100557693 /* TransitionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransitionModel.swift; sourceTree = "<group>"; };
71DF653D2692F92700557693 /* Scene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Scene.swift; sourceTree = "<group>"; };
71DF65402692F94E00557693 /* MainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewModel.swift; sourceTree = "<group>"; };
71DF65422692F95800557693 /* ShopViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopViewModel.swift; sourceTree = "<group>"; };
71DF65462692F97000557693 /* RankViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankViewModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -429,6 +437,27 @@
path = ErrorManager;
sourceTree = "<group>";
};
719D0D9726F18C0700913BBE /* SceneType */ = {
isa = PBXGroup;
children = (
719D0D8F26F1863200913BBE /* MainScene.swift */,
719D0D9126F186F100913BBE /* GameScene.swift */,
719D0D9326F1875100913BBE /* GameHelperScene.swift */,
7123C73F26FD79A70049E6DC /* AlertScene.swift */,
719D0D9526F1889700913BBE /* SceneType.swift */,
);
path = SceneType;
sourceTree = "<group>";
};
71A5517E26A91C160083A4B0 /* FirebaseStorage */ = {
isa = PBXGroup;
children = (
71A5517F26A91C280083A4B0 /* DatabaseManager.swift */,
71A5518126A9277C0083A4B0 /* DatabaseManagerType.swift */,
);
path = FirebaseStorage;
sourceTree = "<group>";
};
71BC752C26A940870021BA1A /* DataFormatManager */ = {
isa = PBXGroup;
children = (
Expand All @@ -449,8 +478,8 @@
71DF653A2692F8D400557693 /* Scene */ = {
isa = PBXGroup;
children = (
719D0D9726F18C0700913BBE /* SceneType */,
71DF653B2692F90100557693 /* TransitionModel.swift */,
71DF653D2692F92700557693 /* Scene.swift */,
71DF65502692FBCC00557693 /* SceneCoordinatorType.swift */,
71DF65522692FBE500557693 /* SceneCoordinator.swift */,
);
Expand Down Expand Up @@ -1034,6 +1063,7 @@
buildActionMask = 2147483647;
files = (
719A6A9B26B11208006AC991 /* NetworkDTO.swift in Sources */,
7123C74026FD79A70049E6DC /* AlertScene.swift in Sources */,
E418F37526DC985B00F35AFB /* AverageColor.swift in Sources */,
E43B64A226ABD81C001D9896 /* GameBackgroundView.swift in Sources */,
E4C2C34D26A24666007BDF81 /* SkyView.swift in Sources */,
Expand All @@ -1044,7 +1074,9 @@
E4BF710526AFD45A00E8645F /* TimeManagerType.swift in Sources */,
E4336F5F26F083840049A5D8 /* BackUpCenterType.swift in Sources */,
710D0D4F2693F6E500244A16 /* ItemCell.swift in Sources */,
719D0D9226F186F100913BBE /* GameScene.swift in Sources */,
E4D7C63E2693E79800D58BA2 /* AppDelegate.swift in Sources */,
719D0D9626F1889700913BBE /* SceneType.swift in Sources */,
715C1C9426BCF9FF0025C681 /* StoryViewController.swift in Sources */,
E45B0AC92692F9CF006FDE3D /* Unit.swift in Sources */,
E45B0AC72692F42D006FDE3D /* UnitPerspectiveView.swift in Sources */,
Expand All @@ -1066,7 +1098,6 @@
E41C85DA269C4E8F008F2E91 /* PauseViewController.swift in Sources */,
E4DF613D26A845DA0061F6E9 /* AdStorage.swift in Sources */,
E4D7C64B26953C6200D58BA2 /* ScreenSize.swift in Sources */,
71DF653E2692F92700557693 /* Scene.swift in Sources */,
E4BF714326B7E23A00E8645F /* GameSoundEffectStation.swift in Sources */,
71DF64BF2692C1C600557693 /* ItemViewController.swift in Sources */,
E4336F5D26F083650049A5D8 /* GameStorageType.swift in Sources */,
Expand Down Expand Up @@ -1114,9 +1145,11 @@
E418F36D26DC8BAC00F35AFB /* BackgroundAnimation.swift in Sources */,
E4A40F9926C1038F003E40B2 /* StoryManager.swift in Sources */,
715A83EE269FE96300C9CEFF /* StoryboardType.swift in Sources */,
719D0D9426F1875100913BBE /* GameHelperScene.swift in Sources */,
71307AB126A53C7B00C3191F /* AlertMessage.swift in Sources */,
71E91E1726BA33190016386E /* Extension.swift in Sources */,
7170CD4526B266BE00F03248 /* VersionErrorViewController.swift in Sources */,
719D0D9026F1863200913BBE /* MainScene.swift in Sources */,
E4CA08B926A8287B00AA6F03 /* Font.swift in Sources */,
E4BF710B26B1324500E8645F /* ReadyView.swift in Sources */,
71DF64B92692C13A00557693 /* ShopViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ private extension AppDelegate {

private func getFirstScene(_ hasLaunchedOnce: Bool,
_ sceneCoordinator: SceneCoordinator,
_ settings: SettingInformation) -> Scene {

_ database: DatabaseManager,
_ settings: SettingInformation) -> SceneType {
switch hasLaunchedOnce {

case true:
let mainViewModel = MainViewModel(sceneCoordinator: sceneCoordinator, storage: storage!, settings: settings)
let mainScene = Scene.main(mainViewModel)
let mainScene = MainScene.main(mainViewModel)
return mainScene

case false:
let storyViewModel = StoryViewModel(sceneCoordinator: sceneCoordinator, storage: storage!, settings: settings)
let storyScene = Scene.story(storyViewModel)
let storyScene = GameHelperScene.story(storyViewModel)
return storyScene

}
Expand Down
121 changes: 0 additions & 121 deletions FullStackCodingBot/FullStackCodingBot/View/Scene/Scene.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class SceneCoordinator: SceneCoordinatorType {
}

@discardableResult
func transition(to scene: Scene, using style: TransitionStyle, with type: StoryboardType, animated: Bool) -> Completable {
func transition(to scene: SceneType, using style: TransitionStyle, with type: StoryboardType, animated: Bool) -> Completable {
let subject = PublishSubject<Void>()
let target = scene.instantiate(from: type.name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import RxSwift
protocol SceneCoordinatorType {

@discardableResult
func transition(to scene: Scene, using style: TransitionStyle, with type: StoryboardType, animated: Bool) -> Completable
func transition(to scene: SceneType, using style: TransitionStyle, with type: StoryboardType, animated: Bool) -> Completable

@discardableResult
func close(animated: Bool) -> Completable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import UIKit
import GameKit
import Firebase

enum AlertScene {
case alert(AlertMessage)
}

extension AlertScene: SceneType {

func instantiate(from identifier: String) -> UIViewController {

switch self {

case .alert(let message):
let alerMessage = message.content.message
let alertScene = UIAlertController(title: alerMessage.title, message: alerMessage.content, preferredStyle: .alert)
let confirmAction = UIAlertAction(title: message.content.confirm, style: .cancel)
alertScene.addAction(confirmAction)
return alertScene

}
}
}
Loading