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

Move the player by a specified amount each frame. More...

Inheritance diagram for ComponentPlayerMovement:
ComponentScript IComponent

Public Member Functions

 this (size_t owner, ComponentTransform transform)
 Set up the script.
 
override void Update ()
 Move the player forward.
 
- 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

ComponentTransform mTransform
 The ComponentTransform of the linked GameObject.
 

Detailed Description

Move the player by a specified amount each frame.

Constructor & Destructor Documentation

◆ this()

ComponentPlayerMovement::this ( size_t owner,
ComponentTransform transform )
inline

Set up the script.

Parameters
ownerthe id of the linked GameObject.
transformthe ComponentTransform of the linked GameObject.

Member Function Documentation

◆ Update()

override void ComponentPlayerMovement::Update ( )
inlinevirtual

Move the player forward.

See also
GameObject::Update

Implements ComponentScript.


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