SpelunkyRemake / Spider.h
Spider.h
Raw
#pragma once
#include "Enemy.h"
#include "SoundEffect.h"

class Spider : public Enemy
{
public:
	enum class ActionState { HANGING, IDLE, JUMPING, DROPPING };

	Spider(int x, int y);
	Spider(const Point2f& pos);
	virtual ~Spider();

	virtual void Draw() const override;
	virtual void Update(float elapsedSec, const Level& level, Player* pPlayer, ParticleManager* pParticleManager) override;

	void SetAction(ActionState action);

	static Texture* m_pTextures;

protected:

	ActionState m_ActionState;
	float m_JumpTimer;
	float m_IdleTimer;

	const float m_JumpDuration;
	const float m_IdleDuration;

	const float m_JumpSpeed;
	const float m_MoveSpeed;

	float m_BrakeSpeed;

	SoundEffect m_JumpSFX;

private:

	static int m_Count;
};