-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayGround.cpp
More file actions
95 lines (81 loc) · 2.4 KB
/
playGround.cpp
File metadata and controls
95 lines (81 loc) · 2.4 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "stdafx.h"
#include "playGround.h"
playGround::playGround()
{
}
playGround::~playGround()
{
}
//초기화는 여기다 하세요 제발
HRESULT playGround::init()
{
gameNode::init();
_camShakeFrame = 0;
//_mainCam.transform->SetX(_mainCam.transform->GetX() + 100);
//testParticle = new image();
//testParticle->init("full_charge_hit_effect_left.bmp", 240, 88, 4, 1, true, RGB(255, 0, 255));
//testParticle2 = new image();
//testParticle2->init("trap_blast_projectile.bmp", 168, 50, 4, 1, true, RGB(255, 0, 255));
//particleObj.AddComponent(new ParticleSystem(testParticle, 5, 5));
//demoParticleSys = particleObj.GetComponent<ParticleSystem>();
//demoParticleSys->SetPosition(WINSIZEX / 2, WINSIZEY / 2);
//demoParticleSys->SetInterval(1000);
//demoParticleSys->SetDuration(150);
//demoParticleSys->SetSpeed(0);
//demoParticleSys->SetLoop(true);
//_mainCam.camera->Shake(3, 2);
_ui.uiRenderer->Resize(WINSIZEX, WINSIZEY);
return S_OK;
}
//메모리 해제는 여기다 하세요 제발
void playGround::release()
{
gameNode::release();
}
//여기에다 연산하세요 제에발
void playGround::update()
{
gameNode::update();
//changeParticleTime++;
//if (changeParticleTime == 300) {
// demoParticleSys->SetParticleImage(testParticle2);
//}
//_camShakeFrame++;
//if (_camShakeFrame == 100) {
// _mainCam.camera->ShakeOff();
//}
//if (_camShakeFrame == 200) {
// _camShakeFrame = 0;
// _mainCam.camera->Shake(6, 2);
//}
oldTime = curTime;
curTime = clock();
SCENEMANAGER->Update();
//_mainCam.Update();
//demoParticleSys->Update();
deltaTime = curTime - oldTime;
//_alphaFrame++;
//if (_alphaFrame == 5) {
// _alphaFrame = 0;
// if (_ui.uiRenderer->alpha > 0)
// _ui.uiRenderer->SetAlpha(_ui.uiRenderer->alpha - 1);
//}
//_ui.Update();
}
//여기에다 그려라 좀! 쫌!
void playGround::render()
{
PatBlt(getMemDC(), 0, 0, MAPSIZEX, MAPSIZEY, WHITENESS);
// 위에 건들지마라
//================제발 이 사이에 좀 그립시다==========================
//demoParticleSys->Render();
SCENEMANAGER->Render();
//==================================================
//여기도 건들지마라
TextOut(_backBuffer->getMemDC(), WINSIZEX / 2 - 50, 30, debug[1], strlen(debug[1]));
TextOut(_backBuffer->getMemDC(), WINSIZEX / 2 - 50, 60, debug[2], strlen(debug[1]));
TextOut(_backBuffer->getMemDC(), WINSIZEX / 2 - 50, 90, error, strlen(error));
//_ui.Render();
//_mainCam.camera->Render(_hdc);
//this->getBackBuffer()->render(hdc, 0, 0);
}