-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSwordMan.cpp
39 lines (36 loc) · 913 Bytes
/
CSwordMan.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
#include "stdafx.h"
#include "Resource.h"
#include <mmsystem.h>
#include <ddraw.h>
#include "gamelib.h"
#include <set>
#include "CResourceCenter.h"
#include "CUnit.h"
#include "CDialog.h"
#include "CSwordman.h"
#include "mygame.h"
namespace game_framework {
CSwordman::CSwordman(){
bmp=CBitmapCollection::GetBitmapCollection()->GetBitmap(SPRITES_UNITS_SWORDMAN);
icon=CBitmapCollection::GetBitmapCollection()->GetBitmap(ICON_UNITS_SWORDMAN);
//bmp = new CMovingBitmap();
//bmp->LoadBitmapA("Bitmaps/Sprites/Units/Swordman/swordman.bmp",0);
//icon=new CMovingBitmap();
//icon->LoadBitmapA("Bitmaps/Icons/Units/swordman.bmp",-1);
iconDialog.pic=*icon;
moveSpeed=5;
atkSpeed = 50;
atkUnit = 5;
atkGridRange = 1;
targetRange = 5;
hp = 50;
this->maxHp = 50;
isAttackable = true;
isCollectable=false;
isRepairable=false;
}
CSwordman::~CSwordman(){
bmp=NULL;
icon=NULL;
}
}