#pragma once

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

#include "../component_physics.h"

#include "../../../../engine/rectangle.h"

typedef struct ComponentActionKeepInRectangle
{
	ECSComponent component;
	Rectangle rectangle;
} ComponentActionKeepInRectangle;

void component_action_keep_in_rectangle_init(ComponentActionKeepInRectangle* self, Rectangle rectangle);
void component_action_keep_in_rectangle_tick(ComponentActionKeepInRectangle* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_ACTION_KEEP_IN_RECTANGLE_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL, 
			(ECSFunction)component_action_keep_in_rectangle_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_ACTION_KEEP_IN_RECTANGLE,
	.size = sizeof(ComponentActionKeepInRectangle)
};


