#pragma once

typedef struct Player player_t;

#include "util.h"
#include "enemy.h"
#include "game.h"
#include "entity.h"

#define PLAYER_MAX_HEALTH 6

struct Player {
  pos_t pos;
  int health;
  int max_health;
  bool on_ground;
  float velocity;
  float gravity;
  int dir;
  bool sneaking;
  bool shooting;
  int damage_timer;
  float fall_height;
  enemy_t *held_enemy;
  bool moving;
  fz_timer_t *timer_walking;
  fz_timer_t *timer_sneaking;
  entity_t *target_entity;
  float shooting_distance;
};

player_t *player_create(pos_t pos);
void player_update(player_t *player, game_t *game);
void player_draw(player_t *player, game_t *game);
void player_free(player_t *player);
