#pragma once

#include "../../component/action/component_action_shoot.h"
#include "../../component/component_game_object.h"
#include "../../component/control/component_control_aim.h"
#include "../../component/control/component_control_move.h"
#include "../../component/control/component_control_shoot.h"
#include "../../component/control/component_control_redirect.h"
#include "../../component/control/component_control_recall.h"
#include "../../component/control/component_control_lock.h"
#include "../../component/stat/component_ammo.h"
#include "../../component/stat/component_health.h"
#include "../../component/stat/component_lifetime.h"
#include "../../component/stat/component_redirect.h"
#include "../../ecs_component.h"

#include "entity_snake.h"

#define PLAYER_SPEED 1
#define PLAYER_FRICTION 0.875
#define PLAYER_VELOCITY_MAX 8
#define PLAYER_ACTION_SHOOT_SPEED 15
#define PLAYER_ACTION_SHOOT_OFFSET 32
#define PLAYER_CONTROL_SHOOT_COOLDOWN 12
#define PLAYER_CONTROL_LOCK_COOLDOWN 60
#define PLAYER_CONTROL_RECALL_COOLDOWN 60
#define PLAYER_CONTROL_REDIRECT_COOLDOWN 1
#define PLAYER_AMMO_MAX 5
#define PLAYER_HEALTH_MAX 3
#define PLAYER_REDIRECT_MAX 5

static const vec2 PLAYER_SIZE = {50.0f, 100.0f};
static const vec2 PLAYER_PHYSICS_SIZE = {50.0f, 50.0f};
static const vec3 PLAYER_OFFSET = {0.0f, -50.0f, 0.0f};

void entity_player_init(ECS* ecs, u32 id, vec3 position);
