-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCStage_Transition.cpp
56 lines (45 loc) · 1.03 KB
/
CStage_Transition.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "pch.h"
#include "CStage_Transition.h"
#include "CCore.h"
#include "CEventMgr.h"
#include "CTransition.h"
#include "CAnimation.h"
#include "CAnimator.h"
void CStage_Transition::Enter()
{
Init();
}
void CStage_Transition::Init()
{
m_pTransition = new CTransition;
m_pTransition->SetPos(Vec{ CCore::GetInst()->GetResolution().x / 2.f, CCore::GetInst()->GetResolution().y / 2.f });
AddObject(m_pTransition, EOBJ_TYPE::DEFAULT);
}
void CStage_Transition::Update()
{
CStage::Update();
CAnimation* pAnimation = m_pTransition->GetAnimator()->GetCurAnimation();
if (pAnimation->IsFinished())
{
tEventInfo event;
event.eType = EEVENT_TYPE::STAGE_CHANGE;
event.lParam = (DWORD_PTR)ESTAGE_TYPE::PUZZLE;
event.wParam = (DWORD_PTR)m_eNextChap;
CEventMgr::GetInst()->AddEvent(event);
}
}
void CStage_Transition::Render(HDC _dc)
{
CStage::Render(_dc);
}
void CStage_Transition::Exit()
{
}
CStage_Transition::CStage_Transition()
:m_eNextChap (ECHAPTER::CHAP_1)
{
}
CStage_Transition::~CStage_Transition()
{
CStage::Clear();
}