\hypertarget{classHealthComponent}{}\doxysection{Health\+Component Class Reference}
\label{classHealthComponent}\index{HealthComponent@{HealthComponent}}


{\ttfamily \#include $<$Health\+Component.\+h$>$}



Inheritance diagram for Health\+Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=185pt]{d2/d67/classHealthComponent__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for Health\+Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=185pt]{d1/d1d/classHealthComponent__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classHealthComponent_aa28f1db8018726c3aca9110369ab7fda}{Health\+Component}} (int total\+Health)
\item 
\mbox{\hyperlink{classHealthComponent_aac06fe69b879a4eb47ddce62f18ca2f9}{$\sim$\+Health\+Component}} ()
\item 
void \mbox{\hyperlink{classHealthComponent_ab754979c3a0ac83d2fb7e163dd168d18}{Update}} (SDL\+\_\+\+Event r, int frame, std\+::vector$<$ std\+::string $>$ broadcast\+List) override
\item 
void \mbox{\hyperlink{classHealthComponent_a196e71923fbf5458a243846e5b71fa6f}{Render}} (SDL\+\_\+\+Renderer $\ast$ren) override
\item 
void \mbox{\hyperlink{classHealthComponent_a8ee269e60d65fb673c09ed1678ee433d}{Show\+Component\+Editor}} (bool $\ast$show\+Editor) override
\item 
void \mbox{\hyperlink{classHealthComponent_a1318c479f692c3dede234ecbb2530558}{Set\+Health}} (int new\+Health)
\item 
void \mbox{\hyperlink{classHealthComponent_a453210b44b4483b3e74fdff60fc832bb}{Update\+Health}} (int change\+In\+Health)
\item 
const char $\ast$ \mbox{\hyperlink{classHealthComponent_a14144ba98cdc2ce2fbb96ec31cf38a6d}{Component\+Type\+Name}} () override
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{classComponent}{Component}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classComponent_a8775db6d1a2c1afc2e77cd3c8f39da6f}{Component}} ()
\item 
\mbox{\hyperlink{classComponent_ab8378fa275af98e568a7e91d33d867af}{$\sim$\+Component}} ()
\item 
virtual void \mbox{\hyperlink{classComponent_a9c764c2a5607ef52629458d361ebf16e}{Update}} (SDL\+\_\+\+Event e, int frame, std\+::vector$<$ std\+::string $>$ broadcast\+List)
\item 
virtual void \mbox{\hyperlink{classComponent_ab856bdb8c4357a080d7abcf99871a573}{Render}} (SDL\+\_\+\+Renderer $\ast$ren)
\item 
virtual void \mbox{\hyperlink{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c}{Show\+Component\+Editor}} (bool $\ast$show\+Editor)
\item 
virtual bool \mbox{\hyperlink{classComponent_aed93a0ec70ebc71f34f02eb0a3ad4006}{Has\+Tag}} (Component\+Tag t)
\item 
virtual const char $\ast$ \mbox{\hyperlink{classComponent_a6ad359e7f57daa4ba249aaf5c88da052}{Component\+Type\+Name}} ()
\item 
void \mbox{\hyperlink{classComponent_aea8f0f460a62d86183020bd667b6cbf0}{Parse\+And\+Update\+Broadcast}} (std\+::vector$<$ std\+::string $>$ broadcast\+List)
\end{DoxyCompactItemize}
\doxysubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classHealthComponent_ab5c59b96b90adbfa667683ea4f579ccb}\label{classHealthComponent_ab5c59b96b90adbfa667683ea4f579ccb} 
int {\bfseries m\+\_\+total\+Health}
\item 
\Hypertarget{classHealthComponent_af5f130e34ce0748b24995a2e8aad5159}\label{classHealthComponent_af5f130e34ce0748b24995a2e8aad5159} 
int {\bfseries m\+\_\+current\+Health}
\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}
\doxysubsubsection*{Protected Attributes inherited from \mbox{\hyperlink{classComponent}{Component}}}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classComponent_ab9b45a6a11e943c86770a1b3e085c25c}\label{classComponent_ab9b45a6a11e943c86770a1b3e085c25c} 
std\+::vector$<$ Component\+Tag $>$ {\bfseries tags}
\item 
\Hypertarget{classComponent_a929d29b8cdb9447b70f5e7d990c7d0f0}\label{classComponent_a929d29b8cdb9447b70f5e7d990c7d0f0} 
std\+::vector$<$ std\+::string $>$ {\bfseries previous\+Broadcasts}
\item 
\Hypertarget{classComponent_a7d03b8c23a6fa95fd83f08ad88cd59ee}\label{classComponent_a7d03b8c23a6fa95fd83f08ad88cd59ee} 
std\+::vector$<$ std\+::string $>$ {\bfseries pending\+Broadcasts}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A \doxylink{classComponent}{Component} implementation to record health for a \doxylink{classGameObject}{Game\+Object}. 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classHealthComponent_aa28f1db8018726c3aca9110369ab7fda}\label{classHealthComponent_aa28f1db8018726c3aca9110369ab7fda} 
\index{HealthComponent@{HealthComponent}!HealthComponent@{HealthComponent}}
\index{HealthComponent@{HealthComponent}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{HealthComponent()}{HealthComponent()}}
{\footnotesize\ttfamily Health\+Component\+::\+Health\+Component (\begin{DoxyParamCaption}\item[{int}]{total\+Health }\end{DoxyParamCaption})}

Construct a new Health \doxylink{classComponent}{Component} object


\begin{DoxyParams}{Parameters}
{\em total\+Health} & the maximum the \doxylink{classGameObject}{Game\+Object}\textquotesingle{}s health can be \\
\hline
\end{DoxyParams}
\Hypertarget{classHealthComponent_aac06fe69b879a4eb47ddce62f18ca2f9}\label{classHealthComponent_aac06fe69b879a4eb47ddce62f18ca2f9} 
\index{HealthComponent@{HealthComponent}!````~HealthComponent@{$\sim$HealthComponent}}
\index{````~HealthComponent@{$\sim$HealthComponent}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{$\sim$HealthComponent()}{\string~HealthComponent()}}
{\footnotesize\ttfamily Health\+Component\+::$\sim$\+Health\+Component (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Destroy the Health \doxylink{classComponent}{Component} object 

\doxysubsection{Member Function Documentation}
\Hypertarget{classHealthComponent_a14144ba98cdc2ce2fbb96ec31cf38a6d}\label{classHealthComponent_a14144ba98cdc2ce2fbb96ec31cf38a6d} 
\index{HealthComponent@{HealthComponent}!ComponentTypeName@{ComponentTypeName}}
\index{ComponentTypeName@{ComponentTypeName}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{ComponentTypeName()}{ComponentTypeName()}}
{\footnotesize\ttfamily const char $\ast$ Health\+Component\+::\+Component\+Type\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}

The name of the component type. Used by the GUI

\begin{DoxySeeAlso}{See also}
\doxylink{classGameMakerGUI_a39546dd352c9c5d198f61e34011131b4}{Game\+Maker\+GUI\+::\+Create\+Component()} 
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
the name of the component 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classComponent_a6ad359e7f57daa4ba249aaf5c88da052}{Component}}.

\Hypertarget{classHealthComponent_a196e71923fbf5458a243846e5b71fa6f}\label{classHealthComponent_a196e71923fbf5458a243846e5b71fa6f} 
\index{HealthComponent@{HealthComponent}!Render@{Render}}
\index{Render@{Render}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{Render()}{Render()}}
{\footnotesize\ttfamily void Health\+Component\+::\+Render (\begin{DoxyParamCaption}\item[{SDL\+\_\+\+Renderer $\ast$}]{ren }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Renders the component (if it has anything to render)


\begin{DoxyParams}{Parameters}
{\em ren} & the SDL renderer to be displayed upon \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classIGraphicsEngineRenderer}{IGraphics\+Engine\+Renderer} 
\end{DoxySeeAlso}


Reimplemented from \mbox{\hyperlink{classComponent_ab856bdb8c4357a080d7abcf99871a573}{Component}}.

\Hypertarget{classHealthComponent_a1318c479f692c3dede234ecbb2530558}\label{classHealthComponent_a1318c479f692c3dede234ecbb2530558} 
\index{HealthComponent@{HealthComponent}!SetHealth@{SetHealth}}
\index{SetHealth@{SetHealth}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{SetHealth()}{SetHealth()}}
{\footnotesize\ttfamily void Health\+Component\+::\+Set\+Health (\begin{DoxyParamCaption}\item[{int}]{new\+Health }\end{DoxyParamCaption})}

Set the current health.


\begin{DoxyParams}{Parameters}
{\em new\+Health} & the new health value \\
\hline
\end{DoxyParams}
\Hypertarget{classHealthComponent_a8ee269e60d65fb673c09ed1678ee433d}\label{classHealthComponent_a8ee269e60d65fb673c09ed1678ee433d} 
\index{HealthComponent@{HealthComponent}!ShowComponentEditor@{ShowComponentEditor}}
\index{ShowComponentEditor@{ShowComponentEditor}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{ShowComponentEditor()}{ShowComponentEditor()}}
{\footnotesize\ttfamily void Health\+Component\+::\+Show\+Component\+Editor (\begin{DoxyParamCaption}\item[{bool $\ast$}]{show\+Editor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Using Imgui, render an editor for this component

\begin{DoxySeeAlso}{See also}
\doxylink{classGameMakerGUI_a2cc6da97c0f4b45175ddc9683308866e}{Game\+Maker\+GUI\+::\+Render\+Editor()} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em show\+Editor} & \\
\hline
\end{DoxyParams}


Reimplemented from \mbox{\hyperlink{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c}{Component}}.

\Hypertarget{classHealthComponent_ab754979c3a0ac83d2fb7e163dd168d18}\label{classHealthComponent_ab754979c3a0ac83d2fb7e163dd168d18} 
\index{HealthComponent@{HealthComponent}!Update@{Update}}
\index{Update@{Update}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{Update()}{Update()}}
{\footnotesize\ttfamily void Health\+Component\+::\+Update (\begin{DoxyParamCaption}\item[{SDL\+\_\+\+Event}]{e,  }\item[{int}]{frame,  }\item[{std\+::vector$<$ std\+::string $>$}]{broadcast\+List }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

Updates the state of the component object. Called by the \doxylink{classEngine}{Engine} every tick


\begin{DoxyParams}{Parameters}
{\em e} & any inputs given by the user \\
\hline
{\em frame} & what frame is the game currently displaying \\
\hline
{\em broadcast\+List} & a list to be used to send messages between components \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classComponent_aea8f0f460a62d86183020bd667b6cbf0}{Parse\+And\+Update\+Broadcast()} 
\end{DoxySeeAlso}


Reimplemented from \mbox{\hyperlink{classComponent_a9c764c2a5607ef52629458d361ebf16e}{Component}}.

Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dd/d81/classHealthComponent_ab754979c3a0ac83d2fb7e163dd168d18_cgraph}
\end{center}
\end{figure}
\Hypertarget{classHealthComponent_a453210b44b4483b3e74fdff60fc832bb}\label{classHealthComponent_a453210b44b4483b3e74fdff60fc832bb} 
\index{HealthComponent@{HealthComponent}!UpdateHealth@{UpdateHealth}}
\index{UpdateHealth@{UpdateHealth}!HealthComponent@{HealthComponent}}
\doxysubsubsection{\texorpdfstring{UpdateHealth()}{UpdateHealth()}}
{\footnotesize\ttfamily void Health\+Component\+::\+Update\+Health (\begin{DoxyParamCaption}\item[{int}]{change\+In\+Health }\end{DoxyParamCaption})}

Modify the health by the given value.


\begin{DoxyParams}{Parameters}
{\em change\+In\+Health} & a modifier to the health value. Set it to a positive value for healing and a negative value for damaging \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
include/Health\+Component.\+h\item 
src/Health\+Component.\+cpp\end{DoxyCompactItemize}
