Level H Engine
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CannonControllerComponent Class Reference

A class that handles the cannon controller component. More...

#include <CannonControllerComponent.h>

Inheritance diagram for CannonControllerComponent:
Inheritance graph
Collaboration diagram for CannonControllerComponent:
Collaboration graph

Public Member Functions

virtual ~CannonControllerComponent ()
 A virtual destructor. More...
 
virtual void onAwake ()
 A virtual function for the componets awake. More...
 
virtual void onDestroy ()
 A virtual function for the componets destroy. More...
 
void handleInput ()
 
void update ()
 
void setCannonPower (float inPower)
 
float getCannonPower ()
 
void setCannonAngle (Vec2 inAngle)
 
Vec2 getCannonAngle ()
 
void setCannonRotation (Vec3 inRot)
 
Vec3 getCannonRotation ()
 
Vec3 getCannonLaunchVelocities ()
 
- Public Member Functions inherited from Component
virtual ~Component ()
 A virtual destructor. More...
 
std::weak_ptr< GameObjectgetGameObject ()
 A function to get the game object linked with the component. More...
 
virtual void onUpdate ()
 A virtual function for the componets update. More...
 
virtual void onRender ()
 A virtual function for the componets render. More...
 
void setDestroyed (bool inDestroyed)
 A function to set the componets destroyed boolean. More...
 
bool getDestroyed ()
 A function to get the componets destroyed boolean. More...
 
std::string getID ()
 A function to set the components type ID. More...
 

Private Member Functions

Vec3 calculateLaunchVeclocites ()
 

Private Attributes

float cannonPower
 The cannon velocity. More...
 
Vec2 cannonAngle
 The cannon angle. More...
 
Vec3 cannonRot
 The cannon rotation. More...
 
float rotationSpeed
 The speed of the rotation. More...
 

Additional Inherited Members

- Protected Attributes inherited from Component
std::string id
 The ID of the component type. More...
 

Detailed Description

A class that handles the cannon controller component.

Constructor & Destructor Documentation

◆ ~CannonControllerComponent()

CannonControllerComponent::~CannonControllerComponent ( )
virtual

A virtual destructor.

Member Function Documentation

◆ calculateLaunchVeclocites()

Vec3 CannonControllerComponent::calculateLaunchVeclocites ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCannonAngle()

Vec2 CannonControllerComponent::getCannonAngle ( )
inline

◆ getCannonLaunchVelocities()

Vec3 CannonControllerComponent::getCannonLaunchVelocities ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCannonPower()

float CannonControllerComponent::getCannonPower ( )
inline

◆ getCannonRotation()

Vec3 CannonControllerComponent::getCannonRotation ( )
inline

◆ handleInput()

void CannonControllerComponent::handleInput ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onAwake()

void CannonControllerComponent::onAwake ( )
virtual

A virtual function for the componets awake.

Reimplemented from Component.

◆ onDestroy()

void CannonControllerComponent::onDestroy ( )
virtual

A virtual function for the componets destroy.

Reimplemented from Component.

◆ setCannonAngle()

void CannonControllerComponent::setCannonAngle ( Vec2  inAngle)
inline

◆ setCannonPower()

void CannonControllerComponent::setCannonPower ( float  inPower)
inline

◆ setCannonRotation()

void CannonControllerComponent::setCannonRotation ( Vec3  inRot)
inline

◆ update()

void CannonControllerComponent::update ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cannonAngle

Vec2 CannonControllerComponent::cannonAngle
private

The cannon angle.

◆ cannonPower

float CannonControllerComponent::cannonPower
private

The cannon velocity.

◆ cannonRot

Vec3 CannonControllerComponent::cannonRot
private

The cannon rotation.

◆ rotationSpeed

float CannonControllerComponent::rotationSpeed
private

The speed of the rotation.


The documentation for this class was generated from the following files: