#pragma once
#include "Entity.h"
#include "CS_Boss_SoapKingMagicFloor.h"
struct ControlledFloor
{
    std::weak_ptr<CS_Boss_SoapKingMagicFloor> floor;
    int wallTime = 180;
};

//法术：在自己面前设置一道墙，过x秒后，每道墙将向目标攻击
class CS_Boss_SoapKingMagicFloor_Wall :
    public ActionEntity
{
public:
    CS_Boss_SoapKingMagicFloor_Wall(std::shared_ptr<Entity> parent, float x, float y, int dir, int count, int wallTime);
    void Step() override;
private:
    int setDir = 0;//上右下左
    int setCount = 0;
    int setWallTime = 0;//在成为墙的时候的状态时间
    int setInterval_count = 0;
    int setInterval_count_max = 8;
    std::list<ControlledFloor> cfArr;
};

void SetCS_Boss_SoapKingMagicFloor_Wall(std::shared_ptr<Entity> parent, float x, float y, int dir, int count, int wallTime);