#pragma once
#include "Entity.h"
#define CS_RAINBOWBUBBLE_CREATENAME L"CS_rainbow_bubble"
//彩虹捕获气泡（会捕获靠近的生物，然后上升，接触墙体时被破坏）
class CS_RainbowBubble :
    public Entity
{
public:
    CS_RainbowBubble();
    void Step() override;
    void Destroy() override;
    void Collision() override;//执行碰撞
    bool Hurt(std::weak_ptr<Entity> src, int getDamage, float angle, bool bTakedown, int elemType, float shockForce, float heavy, int* outRealDamage) override;
    void Catch(std::weak_ptr<Entity> target);
    void SetSpray();
    std::weak_ptr<Entity> target;
    bool target_attackState = false;
    int target_damage_reset_counter = 0;
    int target_attackState_reset_counter_max = 0;
    bool target_drawBeforeOtherEntity = false;
    int ignoreBreak = 60;
    bool bJump = false;
    void MoveControl(std::shared_ptr<Entity>& we);
};

std::shared_ptr<Entity> CreateCS_RainbowBubble();