44 lines
1.4 KiB
C++
44 lines
1.4 KiB
C++
#pragma once
|
|
|
|
class Entity;
|
|
class Human;
|
|
class Bullet;
|
|
class Room;
|
|
|
|
class GridCell
|
|
{
|
|
public:
|
|
|
|
GridCell();
|
|
void ClearRoomData(Room* room);
|
|
void AddHuman(Human* hum);
|
|
void RemoveHuman(Human* hum);
|
|
bool ExistsHuman(Human* hum);
|
|
void TouchHumanList(std::function<void (Human*, bool&)>& func,
|
|
int room_idx,
|
|
bool& stop);
|
|
void TouchHumanListEx(std::function<void (Human*, bool&)> func,
|
|
int room_idx,
|
|
bool& stop);
|
|
|
|
void AddBullet(Bullet* bullet);
|
|
void RemoveBullet(Bullet* bullet);
|
|
void AddPermanentEntity(Entity* entity);
|
|
void AddRoomEntity(Room* room, Entity* entity);
|
|
void RemoveRoomEntity(Room* room, Entity* entity);
|
|
bool ExistsEntity(Room* room, Entity* Entity);
|
|
void TouchLayer0EntityList(std::function<void (Entity*, bool&)>& func,
|
|
bool& stop);
|
|
void TouchLayer1EntityList(std::function<void (Entity*, bool&)>& func,
|
|
int room_idx,
|
|
bool& stop);
|
|
void TouchAllLayerEntityList(std::function<void (Entity*, bool&)>& func,
|
|
int room_idx,
|
|
bool& stop);
|
|
|
|
private:
|
|
std::vector<std::set<Human*>> human_list_;
|
|
std::vector<std::set<Entity*>> entity_list_;
|
|
std::vector<std::set<Bullet*>> bullet_list_;
|
|
};
|