-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.h
More file actions
38 lines (31 loc) · 694 Bytes
/
Player.h
File metadata and controls
38 lines (31 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Player.h
* GosuCppTutorial
*
* Created by doug livesey on 20/11/2010.
* Copyright 2010 spatial intelligence. All rights reserved.
*
*/
#ifndef __PLAYER_H
#define __PLAYER_H
#include <Gosu/Gosu.hpp>
#include <Gosu/AutoLink.hpp>
#include <list>
#include <boost/scoped_ptr.hpp>
#include "enums.h"
#include "Star.h"
class Player {
public:
explicit Player( Gosu::Graphics& graphics );
void warp( double x, double y );
void turnLeft();
void turnRight();
void accelerate();
void move();
void draw() const;
void collectStars( std::list<Star>& stars ) const;
private:
boost::scoped_ptr<Gosu::Image> image;
double posX, posY, velX, velY, angle;
};
#endif