Class PlayerController

Inheritance Relationships

Base Type

Class Documentation

class PlayerController : public Component

Defines a PlayerController that can be directly used to create a controllable player element.

Public Functions

PlayerController(Entity &owner, const JSON::json &data)
~PlayerController()
void update(float deltaMilliseconds)
bool setupData()

Perform setting up internal data needed from other components after they have been added to the owning entity.

JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

void drawAnimation(const char *animation, String &editing)

Public Members

String m_WalkAnimation
String m_RunAnimation
String m_IdleAnimation
String m_TurnLeftAnimation
String m_TurnRightAnimation
float m_MaxWalkSpeed
float m_MaxRunSpeed
float m_StoppingPower
float m_IdleThreshold
Ref<StateManager> m_StateManager
float m_Acceleration
Vector3 m_Velocity