Added some comments.
This commit is contained in:
@@ -14,19 +14,24 @@ public:
|
||||
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cComponent, double dt) override;
|
||||
virtual void Update(double dt) override;
|
||||
private:
|
||||
// The logic for making the sound play when player is moving
|
||||
void playerStep(double dt);
|
||||
EntityWrapper m_LocalPlayer = EntityWrapper();
|
||||
|
||||
World* m_World = nullptr;
|
||||
EventBroker* m_EventBroker = nullptr;
|
||||
|
||||
// Logic for playing a sound when a player jumps
|
||||
void playerJumps();
|
||||
|
||||
|
||||
// TODO: WIP Update this
|
||||
// Walking logic
|
||||
// Keeps track of how far the player has walked within this "key press session".
|
||||
float m_DistanceMoved = 0.0f;
|
||||
const float m_PlayerStepLength = 2.0f;
|
||||
// How far a step is (How often the step sound will be played).
|
||||
const float m_PlayerStepLength = 1.75f;
|
||||
// To get a difference when calculating the walking state.
|
||||
glm::vec3 m_LastPosition = glm::vec3();
|
||||
// Determine what sound file to play.
|
||||
bool m_LeftFoot = false;
|
||||
|
||||
EventRelay<SoundSystem, Events::PlayerSpawned> m_EPlayerSpawned;
|
||||
|
||||
Reference in New Issue
Block a user