-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKOF_Iori.cpp
More file actions
69 lines (60 loc) · 1.04 KB
/
KOF_Iori.cpp
File metadata and controls
69 lines (60 loc) · 1.04 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
#include "KOF_Iori.h"
#include "Image.h"
void KOF_Iori::Init()
{
pos = { 0.0f, 0.0f };
moveSpeed = 5.0f;
image = new Image();
if (FAILED(image->Init(TEXT("Image/iori_walk.bmp"), 612, 104, 9, 1,
true, RGB(255,0,255))))
{
MessageBox(g_hWnd, TEXT("Image/iori_walk.bmp ÆÄÀÏ ·Îµå¿¡ ½ÇÆÐ"), TEXT("°æ°í"), MB_OK);
}
elapsedFrame = 0;
currAnimaionFrame = 0;
}
void KOF_Iori::Release()
{
if (image)
{
image->Release();
delete image;
image = nullptr;
}
}
void KOF_Iori::Update()
{
elapsedFrame++;
//if (elapsedFrame >= 5)
if (KeyManager::GetInstance()->IsOnceKeyUp(VK_SPACE))
{
currAnimaionFrame++;
Move();
if (currAnimaionFrame > 8)
{
currAnimaionFrame = 0;
}
elapsedFrame = 0;
}
//currAnimaionFrame = elapsedFrame / 5;
//if (currAnimaionFrame > 8)
//{
// currAnimaionFrame = 0;
// elapsedFrame = 0;
//}
}
void KOF_Iori::Render(HDC hdc)
{
if (image)
image->Render(hdc, pos.x, pos.y, currAnimaionFrame, true);
}
void KOF_Iori::Move()
{
pos.x += moveSpeed;
}
KOF_Iori::KOF_Iori()
{
}
KOF_Iori::~KOF_Iori()
{
}