cs381/as6/components/PhysicsComponent.hpp

17 lines
327 B
C++

#pragma once
#include "Component.hpp"
/**
* Integrates velocity into transform each frame with a speed cap.
*/
struct PhysicsComponent : public Component {
float vx = 0.0f;
float vy = 0.0f;
float speedCap = 400.0f;
void Setup() override;
void Update(float dt) override;
void Cleanup() override;
};