Advertisement
Patasuss

code

May 24th, 2018
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. class Entity {
  2. virtual void update();
  3. virtual void render();
  4. }
  5.  
  6. struct PhysicsData {
  7. int x, y, x_vel, y_vel;
  8. }
  9.  
  10. void updatePhysics(PhysicsData& p) {...}
  11.  
  12. struct GeometryRenderData() {
  13. ...
  14. }
  15.  
  16. void renderGeometry(GeometryRenderData& d) {...}
  17.  
  18. class Box : Entity {
  19. PhysicsData physData;
  20. GeometryRenderData geoData;
  21.  
  22. void update() {
  23. updatePhysics(physData);
  24. }
  25.  
  26. void render() {
  27. renderGeometry(geoData);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement