forked from Dzejrou/tdt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOnHitHelper.hpp
More file actions
51 lines (45 loc) · 1.42 KB
/
Copy pathOnHitHelper.hpp
File metadata and controls
51 lines (45 loc) · 1.42 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
#pragma once
#include <Ogre.h>
#include <cstdlib>
#include <string>
class EntitySystem;
/**
* Auxiliary namespace containing functions that help with the management of
* the on hit component.
*/
namespace OnHitHelper
{
/**
* Brief: Sets the blueprint table handling incoming hits of a given entity.
* Param: EntitySystem that contains the entity.
* Param: ID of the entity.
* Param: The new blueprint name.
*/
void set_blueprint(EntitySystem&, std::size_t, const std::string&);
/**
* Brief: Returns the name of the on hit blueprint of a given entity.
* Param: EntitySystem that contains the entity.
* Param: ID of the entity.
*/
const std::string& get_blueprint(EntitySystem&, std::size_t);
/**
* Brief: Calls the on hit handler of a given entity.
* Param: EntitySystem that contains the entity.
* Param: ID of the entity.
* Param: ID of the hitter. (Source of the attack.)
*/
void call(EntitySystem&, std::size_t, std::size_t);
/**
* Brief: Sets the cooldown between on hit blueprint calls of a given entity.
* Param: EntitySystem that contains the entity.
* Param: ID of the entity.
* Param: The new cooldown.
*/
void set_cooldown(EntitySystem&, std::size_t, Ogre::Real);
/**
* Brief: Returns the cooldown between on hit blueprint calls of a given entity.
* Param: EntitySystem that contains the entity.
* Param: ID of the entity.
*/
Ogre::Real get_cooldown(EntitySystem&, std::size_t);
}