-
Notifications
You must be signed in to change notification settings - Fork 21
/
enemy.h
44 lines (34 loc) · 815 Bytes
/
enemy.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
#ifndef __ENEMY_H__
#define __ENEMY_H__
#include <string>
#include <vector>
#include <iostream>
#include <math.h>
#include <Urho3D/Graphics/AnimatedModel.h>
#include <Urho3D/Graphics/Animation.h>
#include <Urho3D/Graphics/AnimationState.h>
#include "world.h"
#include "constants.h"
#include "vox.h"
#include "chunk.h"
using namespace Urho3D;
class Enemy: public LogicComponent
{
URHO3D_OBJECT(Enemy, LogicComponent);
public:
Enemy(Context*, Vector3 pos);
~Enemy();
void Update(float time, float timeStep);
void Hit(Vector3 pos, int power);
Node *node;
Node *cnode;
private:
Context *context;
Vox *vox;
Chunk *chunk;
bool alive;
SharedPtr<AnimatedModel> model;
SharedPtr<Animation> animation;
SharedPtr<AnimationState> animation_state;
};
#endif