#pragma once
#include "Entity.h"
#include "CS_MyCharAi_Icon.h"
#define CS_ACTIONCOPYAI_CREATENAME L"CS_actioncopy_ai"
struct MoveOp
{
	float x;
	float y;
};
//动作复制AI
//复制跟随目标的操作
class CS_ActionCopyAi :
    public Entity
{
public:
	void Init(std::weak_ptr<Entity> self) override;
	void Step() override;
	void Destroy() override;
	std::weak_ptr<CS_MyCharAi_Icon> icon;//浮在AI控制的玩家头顶上
private:
	void InitControlTarget();
	void CheckResetFollowTarget();
	void ResetFollowTarget();
	std::list<GameInput> shadowOpList;
	std::list<MoveOp> moveOpList;
	float initX = 0;
	float initY = 0;
};

std::shared_ptr<Entity> CreateCS_ActionCopyAi();