#pragma once
#include "EntityState.h"
#include "PeReadyBar.h"
extern const int CS_CurlySTATENAME_MACHINEGUN;
//技能：使用机关枪武器
class CS_CurlyMachineGun :
	public EntitySkillState
{
public:
	CS_CurlyMachineGun();
	const wchar_t* GetSaveName() override;
	const wchar_t* GetFuncName() override;
	const wchar_t* GetCheckFuncName() override;
	void SubStep() override;
	void ChangeStateMsg(int stateID) override;
	static bool ReadyBar_Leave(std::weak_ptr<Entity> e);
	static void ReadyBar_Destroy(std::weak_ptr<Entity> e);
	std::weak_ptr<PeReadyBar> ammoBar;
	int ammo_count = 100;
	int ammo_count_max = 100;
	float fcounter = 0;
	int outOfAmmo_counter = 0;
	int outOfAmmo_counter_max = 60;
	int shootingToRefill_counter = 0;
	int shootingToRefill_counter_max = 16;
	int ammoRefill_counter = 0;
	int ammoRefill_counter_max = 0;
	bool openGatling = false;
	std::vector<float> angleBuffer;
};

