diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-12 19:52:48 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-12 19:52:48 -0400 |
commit | ce7a96683ee94f8764e7811a5d6167b248accb7c (patch) | |
tree | 940f36c62610faa273a3b2ecf15968f0828930ad /src/entities.cpp | |
parent | a744d3312dd2f0253f7965253b3eff683cca3453 (diff) |
entity-world binding
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index 754c777..19ac536 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -1,6 +1,6 @@ #include <entities.h> -void Entities::spawn(float x, float y){ +void Entity::spawn(float x, float y){ loc.x = x; loc.y = y; vel.x = 0; @@ -8,6 +8,10 @@ void Entities::spawn(float x, float y){ right = false; left = false; } +void Entity::draw(void){ + glColor3ub(0,0,100); + glRectf(loc.x,loc.y,loc.x+width,loc.y+height); +} Player::Player(){ width = HLINE * 8; |