-
Notifications
You must be signed in to change notification settings - Fork 1
/
Unit.h
53 lines (43 loc) · 1015 Bytes
/
Unit.h
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
//
// Unit.h
// SpongeBobWars
//
// Created by Philip Dougherty on 11/23/11.
// Copyright 2011 UW Madison. All rights reserved.
//
#ifndef H_UNIT
#define H_UNIT
#include "Model.h"
#include "DrawableGeometry.h"
#include "Player.h"
class Unit : public DrawableGeometry
{
public:
Unit(void);
Unit(int type, Player * o, bool attacker);
void initThings();
bool attacker;
Player * owner;
int pos;
int type;
int level;
int health;
int maxHealth;
int damage;
int speed;
int range;
int cooldown;
void reset();
void resetCooldown();
void setType(int type);
void setTypeColor(int type);
bool attack(Unit * enemy);
static bool compiled; //True iff displayList names a valid glDisplayList
static GLuint typeList; //Name of displaylist for object
static GLuint teamList; //Name of displaylist for object
static GLuint healthBar;
void compileDL();
void draw();
void drawAtPosition();
};
#endif