99 lines
1.9 KiB
C++
99 lines
1.9 KiB
C++
#include "CharacterJobScene.h"
|
|
|
|
#include "DungeonScene.h"
|
|
#include "GameInstance.h"
|
|
#include "MainMenuScene.h"
|
|
#include "Core/Subsystems/GameInputSystem.h"
|
|
#include "Core/Subsystems/GameDataManager.h"
|
|
#include "Core/Subsystems/SceneManager.h"
|
|
#include "Game/Characters/Player/Player.h"
|
|
#include "Game/Characters/Player/Archer/Archer.h"
|
|
#include "Game/Characters/Player/Mage/Mage.h"
|
|
#include "Game/Characters/Player/Rogue/Rogue.h"
|
|
#include "Game/Characters/Player/Warrior/Warrior.h"
|
|
|
|
CharacterJobScene::CharacterJobScene(GameSceneManager* InOwner) :
|
|
CoreScene(InOwner)
|
|
{
|
|
bEnableTick = true;
|
|
}
|
|
|
|
CharacterJobScene::~CharacterJobScene()
|
|
{
|
|
}
|
|
|
|
void CharacterJobScene::Enter()
|
|
{
|
|
|
|
}
|
|
|
|
void CharacterJobScene::Update()
|
|
{
|
|
system("cls");
|
|
|
|
PlayerStatData* PlayerData = GDataMgr->GetPlayerData();
|
|
|
|
int SelectNum = 0;
|
|
GInput << Game::InitCharacterJob::MainMenuTitle;
|
|
GInput << PlayerData->Name << Game::InitCharacterJob::SelectJobGuide;
|
|
GInput << "1. 전사 2. 마법사 3. 도적 4. 궁수" << "\n";
|
|
GInput << "선택: ";
|
|
|
|
if (!(GInput >> SelectNum))
|
|
{
|
|
GInput.Reset();
|
|
system("pause");
|
|
return;
|
|
}
|
|
|
|
Player* Player = nullptr;
|
|
switch (SelectNum)
|
|
{
|
|
case 1:
|
|
{
|
|
Player = PlayerFactory::CreatePlayer<Warrior>(std::move(*PlayerData));
|
|
break;
|
|
}
|
|
case 2:
|
|
{
|
|
Player = PlayerFactory::CreatePlayer<Mage>(std::move(*PlayerData));
|
|
break;
|
|
}
|
|
case 3:
|
|
{
|
|
Player = PlayerFactory::CreatePlayer<Rogue>(std::move(*PlayerData));
|
|
break;
|
|
}
|
|
case 4:
|
|
{
|
|
Player = PlayerFactory::CreatePlayer<Archer>(std::move(*PlayerData));
|
|
break;
|
|
}
|
|
default:
|
|
{
|
|
GInput << Game::Common::ErrorInput;
|
|
system("pause");
|
|
return;
|
|
}
|
|
}
|
|
|
|
system("pause");
|
|
|
|
GInst->SetLocalPlayer(Player);
|
|
Player->PrintPlayerStatus();
|
|
|
|
system("pause");
|
|
|
|
Exit();
|
|
|
|
}
|
|
|
|
void CharacterJobScene::Exit()
|
|
{
|
|
Owner->TransitionTo<MainMenuScene>();
|
|
}
|
|
|
|
void CharacterJobScene::Release()
|
|
{
|
|
}
|