Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Entity {
- virtual void update();
- virtual void render();
- }
- struct PhysicsData {
- int x, y, x_vel, y_vel;
- }
- void updatePhysics(PhysicsData& p) {...}
- struct GeometryRenderData() {
- ...
- }
- void renderGeometry(GeometryRenderData& d) {...}
- class Box : Entity {
- PhysicsData physData;
- GeometryRenderData geoData;
- void update() {
- updatePhysics(physData);
- }
- void render() {
- renderGeometry(geoData);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement