mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-03 10:26:29 +00:00
140 lines
16 KiB
HTML
140 lines
16 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Bomberman: sources/Component/Health/HealthComponent.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Bomberman
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_08d237fc27d4ecd563f71c5d52f2fecc.html">sources</a></li><li class="navelem"><a class="el" href="dir_1625c0207da71ef5bcc742f7d87fc397.html">Component</a></li><li class="navelem"><a class="el" href="dir_eedd1f11d8d322bfa9082da060c10cd2.html">Health</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">HealthComponent.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="HealthComponent_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Created by Tom Augier on 2021-05-20.</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// Edited by Benjamin Henry on 2021-05-20.</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// Edited by Louis Auzuret on 2021-05-20.</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>  </div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#pragma once</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>  </div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <<a class="code" href="Callback_8hpp.html">Models/Callback.hpp</a>></span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="Component_8hpp.html">Component/Component.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="Entity_8hpp.html">Entity/Entity.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "<a class="code" href="Wal_8hpp.html">Wal.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">namespace </span><a class="code" href="namespaceBBM.html">BBM</a></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> {</div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="classBBM_1_1HealthComponent.html"> 16</a></span>  <span class="keyword">class </span><a class="code" href="classBBM_1_1HealthComponent.html">HealthComponent</a> : <span class="keyword">public</span> <a class="code" href="classWAL_1_1Component.html">WAL::Component</a></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  {</div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="classBBM_1_1HealthComponent.html#a0dcb9db6a32f7dc6144a881c846aa3eb"> 21</a></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classBBM_1_1HealthComponent.html#a0dcb9db6a32f7dc6144a881c846aa3eb">_healthPoint</a>;</div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classBBM_1_1HealthComponent.html#ab6e6c483cf90f16a45cfa1dda3ed5e9e"> 25</a></span>  <a class="code" href="classWAL_1_1Callback.html">WAL::Callback<WAL::Entity &, WAL::Wal &></a> <a class="code" href="classBBM_1_1HealthComponent.html#ab6e6c483cf90f16a45cfa1dda3ed5e9e">onDeath</a>;</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordtype">void</span> <a class="code" href="classBBM_1_1HealthComponent.html#ab8ae4426222d4d531f8d12d29723fbe9">addHealthPoint</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> healthPoint);</div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordtype">void</span> <a class="code" href="classBBM_1_1HealthComponent.html#ac7c0169337f0a000a7009aeb942a3805">takeDmg</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> damage);</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classBBM_1_1HealthComponent.html#a64d002dfb8b5ad39fb658684c93e576f">getHealthPoint</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classWAL_1_1Component.html">WAL::Component</a> *<a class="code" href="classBBM_1_1HealthComponent.html#a7b306deb84464d098401a90d329d0e9b">clone</a>(<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &entity) <span class="keyword">const override</span>;</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="classBBM_1_1HealthComponent.html#ade53c57050557a4b45503b0f9d83cec9">HealthComponent</a>(<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &entity, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> healthPoint, <span class="keyword">const</span> <a class="code" href="classWAL_1_1Callback.html">WAL::Callback<WAL::Entity &, WAL::Wal &></a> &onDeathCallback = <a class="code" href="classWAL_1_1Callback.html">WAL::Callback<WAL::Entity &, WAL::Wal &></a>());</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="code" href="classBBM_1_1HealthComponent.html#ade53c57050557a4b45503b0f9d83cec9">HealthComponent</a>(<span class="keyword">const</span> <a class="code" href="classBBM_1_1HealthComponent.html">HealthComponent</a> &) = <span class="keywordflow">default</span>;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classBBM_1_1HealthComponent.html#a4953b0657d0bca94a1474f83ff57ee1f">~HealthComponent</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>;</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  </div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="classBBM_1_1HealthComponent.html">HealthComponent</a> &<a class="code" href="classBBM_1_1HealthComponent.html#af4cb5fa2938b447afaffe0a09f86e8a7">operator=</a>(<span class="keyword">const</span> <a class="code" href="classBBM_1_1HealthComponent.html">HealthComponent</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  };</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> }</div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_ac7c0169337f0a000a7009aeb942a3805"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#ac7c0169337f0a000a7009aeb942a3805">BBM::HealthComponent::takeDmg</a></div><div class="ttdeci">void takeDmg(unsigned int damage)</div><div class="ttdoc">reduce health</div><div class="ttdef"><b>Definition:</b> HealthComponent.cpp:29</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_a4953b0657d0bca94a1474f83ff57ee1f"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#a4953b0657d0bca94a1474f83ff57ee1f">BBM::HealthComponent::~HealthComponent</a></div><div class="ttdeci">~HealthComponent() override=default</div><div class="ttdoc">default destructor</div></div>
|
|
<div class="ttc" id="aCallback_8hpp_html"><div class="ttname"><a href="Callback_8hpp.html">Callback.hpp</a></div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_ab6e6c483cf90f16a45cfa1dda3ed5e9e"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#ab6e6c483cf90f16a45cfa1dda3ed5e9e">BBM::HealthComponent::onDeath</a></div><div class="ttdeci">WAL::Callback< WAL::Entity &, WAL::Wal & > onDeath</div><div class="ttdoc">The callback invoked on this entity's death.</div><div class="ttdef"><b>Definition:</b> HealthComponent.hpp:25</div></div>
|
|
<div class="ttc" id="aclassWAL_1_1Component_html"><div class="ttname"><a href="classWAL_1_1Component.html">WAL::Component</a></div><div class="ttdoc">Represent a single component of WAL.</div><div class="ttdef"><b>Definition:</b> Component.hpp:17</div></div>
|
|
<div class="ttc" id="anamespaceBBM_html"><div class="ttname"><a href="namespaceBBM.html">BBM</a></div><div class="ttdef"><b>Definition:</b> AnimationsComponent.cpp:9</div></div>
|
|
<div class="ttc" id="aEntity_8hpp_html"><div class="ttname"><a href="Entity_8hpp.html">Entity.hpp</a></div></div>
|
|
<div class="ttc" id="aclassWAL_1_1Entity_html"><div class="ttname"><a href="classWAL_1_1Entity.html">WAL::Entity</a></div><div class="ttdoc">An entity of the WAL's ECS.</div><div class="ttdef"><b>Definition:</b> Entity.hpp:20</div></div>
|
|
<div class="ttc" id="aComponent_8hpp_html"><div class="ttname"><a href="Component_8hpp.html">Component.hpp</a></div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_ab8ae4426222d4d531f8d12d29723fbe9"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#ab8ae4426222d4d531f8d12d29723fbe9">BBM::HealthComponent::addHealthPoint</a></div><div class="ttdeci">void addHealthPoint(unsigned int healthPoint)</div><div class="ttdoc">add health to the entity</div><div class="ttdef"><b>Definition:</b> HealthComponent.cpp:24</div></div>
|
|
<div class="ttc" id="aclassWAL_1_1Callback_html"><div class="ttname"><a href="classWAL_1_1Callback.html">WAL::Callback< WAL::Entity &, WAL::Wal & ></a></div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html"><div class="ttname"><a href="classBBM_1_1HealthComponent.html">BBM::HealthComponent</a></div><div class="ttdef"><b>Definition:</b> HealthComponent.hpp:16</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_a0dcb9db6a32f7dc6144a881c846aa3eb"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#a0dcb9db6a32f7dc6144a881c846aa3eb">BBM::HealthComponent::_healthPoint</a></div><div class="ttdeci">unsigned int _healthPoint</div><div class="ttdoc">life of an entity</div><div class="ttdef"><b>Definition:</b> HealthComponent.hpp:21</div></div>
|
|
<div class="ttc" id="aWal_8hpp_html"><div class="ttname"><a href="Wal_8hpp.html">Wal.hpp</a></div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_a64d002dfb8b5ad39fb658684c93e576f"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#a64d002dfb8b5ad39fb658684c93e576f">BBM::HealthComponent::getHealthPoint</a></div><div class="ttdeci">unsigned int getHealthPoint(void) const</div><div class="ttdoc">return health point of the entity</div><div class="ttdef"><b>Definition:</b> HealthComponent.cpp:37</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_af4cb5fa2938b447afaffe0a09f86e8a7"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#af4cb5fa2938b447afaffe0a09f86e8a7">BBM::HealthComponent::operator=</a></div><div class="ttdeci">HealthComponent & operator=(const HealthComponent &)=delete</div><div class="ttdoc">A Health component can't be assigned.</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_ade53c57050557a4b45503b0f9d83cec9"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#ade53c57050557a4b45503b0f9d83cec9">BBM::HealthComponent::HealthComponent</a></div><div class="ttdeci">HealthComponent(WAL::Entity &entity, unsigned int healthPoint, const WAL::Callback< WAL::Entity &, WAL::Wal & > &onDeathCallback=WAL::Callback< WAL::Entity &, WAL::Wal & >())</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> HealthComponent.cpp:13</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1HealthComponent_html_a7b306deb84464d098401a90d329d0e9b"><div class="ttname"><a href="classBBM_1_1HealthComponent.html#a7b306deb84464d098401a90d329d0e9b">BBM::HealthComponent::clone</a></div><div class="ttdeci">WAL::Component * clone(WAL::Entity &entity) const override</div><div class="ttdoc">Clone a component for another or the same entity.</div><div class="ttdef"><b>Definition:</b> HealthComponent.cpp:19</div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|