forked from Dzejrou/tdt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomingHelper.hpp
More file actions
58 lines (51 loc) · 1.65 KB
/
Copy pathHomingHelper.hpp
File metadata and controls
58 lines (51 loc) · 1.65 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
#pragma once
#include <cstdlib>
class EntitySystem;
/**
* Auxiliary namespace containing functions that help with the management of
* the homing component.
*/
namespace HomingHelper
{
/**
* Brief: Sets the ID of the source (entity that shot it) of a given
* projectile.
* Param: Reference to the entity system containing components.
* Param: ID of the projectile.
* Param: ID of the source.
*/
void set_source(EntitySystem&, std::size_t, std::size_t);
/**
* Brief: Returns the ID of the entity that shot a given projectile.
* Param: Reference to the entity system containing components.
* Param: ID of the projectile.
*/
std::size_t get_source(EntitySystem&, std::size_t);
/**
* Brief: Changes the target of a given homing projectile.
* Param: Reference to the entity system containing components.
* Param: ID of the projectile.
* Param: ID of the target.
*/
void set_target(EntitySystem&, std::size_t, std::size_t);
/**
* Brief: Returns the ID of the target of a given homing projectile.
* Param: Reference to the entity system containing components.
* Param: ID of the projectile.
*/
std::size_t get_target(EntitySystem&, std::size_t);
/**
* Brief: Changes the damage of a given homing
* projectile.
* Param: Reference to the entity system containing components.
* Param: ID of the projectile.
* Param: The new damage value.
*/
void set_dmg(EntitySystem&, std::size_t, std::size_t);
/**
* Brief: Returns the damage value of a given projectile.
* Param: Reference to the entity system containing components.
* Param: ID of the projectile.
*/
std::size_t get_dmg(EntitySystem&, std::size_t);
}