#include "AiKey.h"

void AiKey::SetState(int stateID, int lr)
{
	AiRecord::SetState(stateID, lr);
	ani.sprite_index = L"ai_key";
}

void AiKey::Step()
{
	AiRecord::Step();
	if (!record.empty() && key.key == 0)
		for (auto& i : record)
			key.key |= i.key;
}

std::shared_ptr<Entity> CreateAiKey()
{
	return std::make_shared<AiKey>();
}
