mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-31 19:22:52 +00:00
20 lines
311 B
C++
20 lines
311 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
class Entity;
|
|
class Mob;
|
|
|
|
class Sensing {
|
|
private:
|
|
Mob* mob;
|
|
std::vector<std::weak_ptr<Entity> > seen;
|
|
std::vector<std::weak_ptr<Entity> > unseen;
|
|
|
|
public:
|
|
Sensing(Mob* mob);
|
|
|
|
void tick();
|
|
bool canSee(std::shared_ptr<Entity> target);
|
|
}; |