diff options
| author | realtradam <[email protected]> | 2022-11-05 02:04:30 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-11-05 02:04:30 -0400 |
| commit | 3c8e6238ebed92691dac9393893ca6214ab060ab (patch) | |
| tree | a6bcb9ddca6608a39b70e667231e73bb2ce19472 /src/physics.hpp | |
| parent | e35ff8879409dae845371be867ca76a1cf78cf7f (diff) | |
| download | orbital_game-3c8e6238ebed92691dac9393893ca6214ab060ab.tar.gz orbital_game-3c8e6238ebed92691dac9393893ca6214ab060ab.zip | |
implemented rough physics system
Diffstat (limited to 'src/physics.hpp')
| -rw-r--r-- | src/physics.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/physics.hpp b/src/physics.hpp index fa90c1d..a5b3b83 100644 --- a/src/physics.hpp +++ b/src/physics.hpp @@ -1,5 +1,19 @@ #pragma once +#include "raylib.h" namespace Physics { + class Body { + public: + Vector2 position; + Vector2 velocity; + float mass; + Body(Vector2 position, Vector2 velocity, float mass); + }; + + extern Body ship;// = Body((Vector2){50,50}, (Vector2){0,1}, 1); + extern Body rock;// = Body((Vector2){400,400}, (Vector2){0,0}, 50); + + //0.01667 + void step(float deltaTime); } |
