Polygon Dash
Loading...
Searching...
No Matches
ComponentBounce Class Reference

Make the component bounce. More...

Inheritance diagram for ComponentBounce:
ComponentScript IComponent

Public Member Functions

 this (size_t ownerID, float bounceHeight)
 Set up the script.
 
void SetBounceHeight (float height)
 Set the new bounce height.
 
float GetBounceHeight ()
 Get the current bounce height.
 
override void Update ()
 Update internal state of the script.
 
- Public Member Functions inherited from ComponentScript
 this (size_t id)
 Store the owner id.
 
override void Render (SDL_Renderer *renderer, SDL_Rect *camera)
 Render the given script.
 
- Public Member Functions inherited from IComponent

Public Attributes

float bounceHeight
 The bounce height in pixels.
 

Detailed Description

Make the component bounce.

Constructor & Destructor Documentation

◆ this()

ComponentBounce::this ( size_t ownerID,
float bounceHeight )
inline

Set up the script.

Parameters
ownerthe id of the linked GameObject.
bounceHeightthe bounce height in pixels.

Member Function Documentation

◆ GetBounceHeight()

float ComponentBounce::GetBounceHeight ( )
inline

Get the current bounce height.

Returns
the height in pixels.

◆ SetBounceHeight()

void ComponentBounce::SetBounceHeight ( float height)
inline

Set the new bounce height.

Parameters
heightthe new height in pixels.

◆ Update()

override void ComponentBounce::Update ( )
inlinevirtual

Update internal state of the script.

Implements ComponentScript.


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