mirror of
https://github.com/NoelFB/tiny_link.git
synced 2025-02-23 14:28:27 +08:00
24 lines
384 B
C
24 lines
384 B
C
|
#pragma once
|
||
|
#include "../world.h"
|
||
|
#include "collider.h"
|
||
|
#include <blah.h>
|
||
|
#include <functional>
|
||
|
|
||
|
using namespace Blah;
|
||
|
|
||
|
namespace TL
|
||
|
{
|
||
|
class Hurtable : public Component
|
||
|
{
|
||
|
private:
|
||
|
float m_cooldown_timer = 0;
|
||
|
|
||
|
public:
|
||
|
Collider* collider = nullptr;
|
||
|
uint32_t hurt_by = 0;
|
||
|
float cooldown = 1.0f;
|
||
|
std::function<void(Hurtable* self)> on_hurt;
|
||
|
|
||
|
void update() override;
|
||
|
};
|
||
|
}
|