class Player
{
public:
- player_input_type input;
player_keymap_type keymap;
+ int lives;
int score;
int distros;
+
+ player_input_type input;
bool got_coffee;
int size;
bool duck;
bool jumping;
int frame_;
int frame_main;
- int lives;
- base_type base;
- base_type old_base;
- base_type previous_base;
- timer_type invincible_timer;
- timer_type skidding_timer;
- timer_type safe_timer;
- timer_type frame_timer;
+
+ base_type base;
+ base_type old_base;
+ base_type previous_base;
+ Timer invincible_timer;
+ Timer skidding_timer;
+ Timer safe_timer;
+ Timer frame_timer;
Physic physic;
public:
void init();
int key_event(SDLKey key, int state);
void level_begin();
- void action();
+ void action(double frame_ratio);
void handle_input();
void grabdistros();
void draw();
void keep_in_bounds();
bool on_ground();
bool under_solid();
+
private:
void handle_horizontal_input(int dir);
void handle_vertical_input();