\hypertarget{classProjectileComponent}{}\doxysection{Projectile\+Component Class Reference}
\label{classProjectileComponent}\index{ProjectileComponent@{ProjectileComponent}}


{\ttfamily \#include $<$Projectile\+Component.\+hpp$>$}



Inheritance diagram for Projectile\+Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=199pt]{d0/dda/classProjectileComponent__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for Projectile\+Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d8/df2/classProjectileComponent__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classProjectileComponent_ac67ad7b89802466876a93ff01ab291f5}{Projectile\+Component}} (\mbox{\hyperlink{classRigidbodyComponent}{Rigidbody\+Component}} $\ast$\+\_\+projectile, \mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$\+\_\+target, bool \+\_\+homing, float \+\_\+var)
\item 
\mbox{\hyperlink{classProjectileComponent_afd2a72d0f2027c9a89240891741654d4}{$\sim$\+Projectile\+Component}} ()
\item 
void \mbox{\hyperlink{classProjectileComponent_a38c9c6161b276691004f672991795b54}{Update}} (SDL\+\_\+\+Event e, int frame, std\+::vector$<$ std\+::string $>$ broadcast\+List) override
\item 
void \mbox{\hyperlink{classProjectileComponent_aee9362f7012bd2f0ca5088c63a175dd7}{Render}} (SDL\+\_\+\+Renderer $\ast$ren) 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{classProjectileComponent_ac83385c137918c2b6e78dcee42426b0a}\label{classProjectileComponent_ac83385c137918c2b6e78dcee42426b0a} 
\mbox{\hyperlink{classRigidbodyComponent}{Rigidbody\+Component}} $\ast$ {\bfseries projectile}
\item 
\Hypertarget{classProjectileComponent_ac61241dd06813893db14b79cdda0afed}\label{classProjectileComponent_ac61241dd06813893db14b79cdda0afed} 
\mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$ {\bfseries target}
\item 
bool \mbox{\hyperlink{classProjectileComponent_afe0e491cb2d431b1f8f13ea15058cc11}{homing}}
\item 
\Hypertarget{classProjectileComponent_aea831e10d149edc87b8c4cf733a4aabc}\label{classProjectileComponent_aea831e10d149edc87b8c4cf733a4aabc} 
float {\bfseries speed}
\item 
\Hypertarget{classProjectileComponent_a67612591fc2cc0d67b07d1257e7b3b3a}\label{classProjectileComponent_a67612591fc2cc0d67b07d1257e7b3b3a} 
float {\bfseries angle}
\item 
\Hypertarget{classProjectileComponent_a32ef1237bbbd22f62519f7db2075054c}\label{classProjectileComponent_a32ef1237bbbd22f62519f7db2075054c} 
float {\bfseries gravity} = 10
\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 treat a \doxylink{classGameObject}{Game\+Object} as a projectile. 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classProjectileComponent_ac67ad7b89802466876a93ff01ab291f5}\label{classProjectileComponent_ac67ad7b89802466876a93ff01ab291f5} 
\index{ProjectileComponent@{ProjectileComponent}!ProjectileComponent@{ProjectileComponent}}
\index{ProjectileComponent@{ProjectileComponent}!ProjectileComponent@{ProjectileComponent}}
\doxysubsubsection{\texorpdfstring{ProjectileComponent()}{ProjectileComponent()}}
{\footnotesize\ttfamily Projectile\+Component\+::\+Projectile\+Component (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classRigidbodyComponent}{Rigidbody\+Component}} $\ast$}]{\+\_\+projectile,  }\item[{\mbox{\hyperlink{classTransformComponent}{Transform\+Component}} $\ast$}]{\+\_\+target,  }\item[{bool}]{\+\_\+homing,  }\item[{float}]{\+\_\+var }\end{DoxyParamCaption})}

Construct a new Projectile \doxylink{classComponent}{Component} object.


\begin{DoxyParams}{Parameters}
{\em \+\_\+projectile} & the \doxylink{classRigidbodyComponent}{Rigidbody\+Component} of the parent \doxylink{classGameObject}{Game\+Object} \\
\hline
{\em \+\_\+target} & the \doxylink{classTransformComponent}{Transform\+Component} of the target the Projectile is fired at \\
\hline
{\em \+\_\+homing} & whether the \doxylink{classProjectileComponent}{Projectile\+Component} will seek out the target \\
\hline
{\em \+\_\+var} & if homing, the speed of the projectile. Otherwise, the angle the \doxylink{classProjectileComponent}{Projectile\+Component} is fired at \\
\hline
\end{DoxyParams}
Here is the call graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dd/d7a/classProjectileComponent_ac67ad7b89802466876a93ff01ab291f5_cgraph}
\end{center}
\end{figure}
\Hypertarget{classProjectileComponent_afd2a72d0f2027c9a89240891741654d4}\label{classProjectileComponent_afd2a72d0f2027c9a89240891741654d4} 
\index{ProjectileComponent@{ProjectileComponent}!````~ProjectileComponent@{$\sim$ProjectileComponent}}
\index{````~ProjectileComponent@{$\sim$ProjectileComponent}!ProjectileComponent@{ProjectileComponent}}
\doxysubsubsection{\texorpdfstring{$\sim$ProjectileComponent()}{\string~ProjectileComponent()}}
{\footnotesize\ttfamily Projectile\+Component\+::$\sim$\+Projectile\+Component (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

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

\doxysubsection{Member Function Documentation}
\Hypertarget{classProjectileComponent_aee9362f7012bd2f0ca5088c63a175dd7}\label{classProjectileComponent_aee9362f7012bd2f0ca5088c63a175dd7} 
\index{ProjectileComponent@{ProjectileComponent}!Render@{Render}}
\index{Render@{Render}!ProjectileComponent@{ProjectileComponent}}
\doxysubsubsection{\texorpdfstring{Render()}{Render()}}
{\footnotesize\ttfamily void Projectile\+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{classProjectileComponent_a38c9c6161b276691004f672991795b54}\label{classProjectileComponent_a38c9c6161b276691004f672991795b54} 
\index{ProjectileComponent@{ProjectileComponent}!Update@{Update}}
\index{Update@{Update}!ProjectileComponent@{ProjectileComponent}}
\doxysubsubsection{\texorpdfstring{Update()}{Update()}}
{\footnotesize\ttfamily void Projectile\+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/d7a/classProjectileComponent_a38c9c6161b276691004f672991795b54_cgraph}
\end{center}
\end{figure}


\doxysubsection{Member Data Documentation}
\Hypertarget{classProjectileComponent_afe0e491cb2d431b1f8f13ea15058cc11}\label{classProjectileComponent_afe0e491cb2d431b1f8f13ea15058cc11} 
\index{ProjectileComponent@{ProjectileComponent}!homing@{homing}}
\index{homing@{homing}!ProjectileComponent@{ProjectileComponent}}
\doxysubsubsection{\texorpdfstring{homing}{homing}}
{\footnotesize\ttfamily bool Projectile\+Component\+::homing\hspace{0.3cm}{\ttfamily [private]}}

the \doxylink{classTransformComponent}{Transform\+Component} being attacked 

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