Player Library
Diff: Player.cpp
- Revision:
- 4:6d5ea29f83b0
- Parent:
- 3:60a09496c839
- Child:
- 5:cd9699b836c3
--- a/Player.cpp Mon Apr 24 11:20:53 2017 +0000 +++ b/Player.cpp Mon Apr 24 13:34:45 2017 +0000 @@ -12,13 +12,13 @@ int sprite[3][3] = { {1,0,1}, - {1,1,1}, - {1,1,1}, + {0,1,0}, + {1,0,1}, }; void Player::init(int x, int y) { - _x = WIDTH/2 - 1; // Middle of screen + _x = WIDTH/2; // Middle of screen // DOESNT FUCKING CAHNGE STARTING LOCATION _y = HEIGHT/2; // Near bottom of screen _speed = 0.3; // default speed @@ -32,6 +32,16 @@ +Vector2D Player::get_pos() +{ + Vector2D p = {_x,_y}; + return p; +} + + + + + void Player::update(Direction d,float mag)