#pragma once
#include "Entity.h"
#include "EntityStateGravity.h"
#include "EntityStateSplash.h"
#define CS_TRAPCAGE_CREATENAME L"CS_trapcage"
//ÏÝÚåÁý×Ó
class CS_TrapCage :
    public Entity
{
public:
    CS_TrapCage();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void Destroy() 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 SetSmoke();
    EntityStateGravity stateGravity;
    EntityStateSplash stateSplash;
    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;
    bool target_ignoreMovePlatform = false;
    bool trapState = true;
};

std::shared_ptr<Entity> CreateCS_TrapCage();