#pragma once
#include "EntityState.h"
class EntityStateInvincible :
    public EntityState
{
public:
    EntityStateInvincible();
    void SubStep() override;
    bool Hurt(std::weak_ptr<Entity> src, int* pGetDamage, float* pAngle, bool* pTakedown, int* pElemType,
        float* pShockForce, float* pHeavy, int* outRealDamage, bool* outRetVal) override;
    bool BeginCaught(std::weak_ptr<Entity> src, std::weak_ptr<Entity>& ret) override;
    void SetDamage(int dmg);
    void SetInvincible(int times);
    void EnableFlash(bool enable);
    //伤害累计器
    int hurt_counter = 0;
    int hurt_time_counter = 0;
    int hurt_time_counter_max = 0;
    int invincible_counter = 0;//无敌时间
    bool enableFlash = true;
    bool eternalInvincible = false;//永恒的无敌
};

