#pragma once
#include "Entity.h"
#define CS_AMSOUNDWAVE_CREATENAME L"CS_am_soundwave"
//Éù²¨¹¥»÷
class CS_AmSoundWave :
    public ActionEntity
{
public:
    CS_AmSoundWave(std::shared_ptr<Entity> parent);
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void Attack(std::weak_ptr<Entity> dst, int* outDamage, float* outAngle, bool* outTakedown, int* outElemType, float* outShockForce, float* outHeavy) override;
    int existTime = 120;
    float r = 96;
    struct Point
    {
        float x, y;
        Point(float x = 0, float y = 0) : x(x), y(y) {}
    };
    std::vector<CS_AmSoundWave::Point> polyline;
    void GeneratePolyline(CS_AmSoundWave::Point start, CS_AmSoundWave::Point end, int segments);
    void DrawPolyline();
    bool bLeave = false;
    BYTE alpha = 0xff;
    bool bNormalMode = false;
};

std::shared_ptr<Entity> CreateCS_AmSoundWave();