#pragma once

#include "../../../GAME_COMMON.h"
#include "../../ecs_entity.h"

#include "../component_game_object.h"
#include "../stat/component_game_entity_type.h"
#include "../stat/component_level.h"

#define COMPONENT_BEHAVIOR_CHASE_SOUND_TIMER_MAX 15
#define COMPONENT_BEHAVIOR_CHASE_LEVEL_SPEED_MULTIPLIER 0.15
#define COMPONENT_BEHAVIOR_CHASE_SPEED_MAX 5.0

typedef struct ComponentBehaviorChase
{
	ECSComponent component;
	f32 speed;
	u32 targetID;
	u32 soundTimer;
} ComponentBehaviorChase;

void component_behavior_chase_init(ComponentBehaviorChase* self, f32 speed, u32 targetID);
void component_behavior_chase_tick(ComponentBehaviorChase* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_BEHAVIOR_CHASE_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_behavior_chase_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_BEHAVIOR_CHASE,
	.size = sizeof(ComponentBehaviorChase)
};


