ProjectTextRPG/TextRPG/Source/Game/Scene/MainMenuScene.cpp

64 lines
1.1 KiB
C++

#include "MainMenuScene.h"
#include "DungeonScene.h"
#include "GameInstance.h"
#include "PotionShopScene.h"
#include "InventoryScene.h"
#include "Core/Subsystems/GameInputSystem.h"
#include "Core/Subsystems/SceneManager.h"
MainMenuScene::MainMenuScene(GameSceneManager* InOwner) :
CoreScene(InOwner)
{
bEnableTick = true;
}
MainMenuScene::~MainMenuScene()
{
}
void MainMenuScene::Enter()
{
}
void MainMenuScene::Update()
{
int SelectNum = 0;
GInput << "=== 메인 메뉴 === \n";
GInput << "1. 던전 입장 \n";
GInput << "2. 인벤토리 확인 \n";
GInput << "3. 포션 제작소 \n";
GInput << "4. 게임 종료" << "\n";
GInput << "선택: ";
if (!(GInput >> SelectNum))
{
GInput.Reset();
return;
}
switch (SelectNum)
{
case 1: Owner->TransitionTo<DungeonScene>(); return;
case 2: Owner->TransitionTo<InventoryScene>(); return;
case 3: Owner->TransitionTo<PotionShopScene>(); return;
case 4: GInst->Quit(); return;
default:
{
GInput << Game::Common::ErrorInput;
system("pause");
break;
}
}
}
void MainMenuScene::Exit()
{
CoreScene::Exit();
}
void MainMenuScene::Release()
{
CoreScene::Release();
}