1
This commit is contained in:
parent
95550ab805
commit
f1099980ed
@ -3,16 +3,6 @@
|
|||||||
#include "room.h"
|
#include "room.h"
|
||||||
#include "human.h"
|
#include "human.h"
|
||||||
|
|
||||||
void MoveableEntity::TraverseLayer0EntityList(std::function<void (Entity*, bool&)> func)
|
|
||||||
{
|
|
||||||
room->grid_service->TraverseLayer0EntityList(grid_list_, func);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MoveableEntity::TraverseLayer1EntityList(std::function<void (Entity*, bool&)> func)
|
|
||||||
{
|
|
||||||
room->grid_service->TraverseLayer1EntityList(room->GetRoomIdx(), grid_list_, func);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MoveableEntity::TraverseAllLayerEntityList(std::function<void (Entity*, bool&)> func)
|
void MoveableEntity::TraverseAllLayerEntityList(std::function<void (Entity*, bool&)> func)
|
||||||
{
|
{
|
||||||
room->grid_service->TraverseAllLayerEntityList(room->GetRoomIdx(), grid_list_, func);
|
room->grid_service->TraverseAllLayerEntityList(room->GetRoomIdx(), grid_list_, func);
|
||||||
|
@ -13,8 +13,6 @@ class MoveableEntity : public RoomEntity
|
|||||||
int UpdatedTimes() { return updated_times_;}
|
int UpdatedTimes() { return updated_times_;}
|
||||||
std::set<GridCell*>& GetGridList() { return grid_list_; }
|
std::set<GridCell*>& GetGridList() { return grid_list_; }
|
||||||
|
|
||||||
void TraverseLayer0EntityList(std::function<void (Entity*, bool&)> func);
|
|
||||||
void TraverseLayer1EntityList(std::function<void (Entity*, bool&)> func);
|
|
||||||
void TraverseAllLayerEntityList(std::function<void (Entity*, bool&)> func);
|
void TraverseAllLayerEntityList(std::function<void (Entity*, bool&)> func);
|
||||||
void TraverseAllLayerHumanList(std::function<void (Human*, bool&)> func);
|
void TraverseAllLayerHumanList(std::function<void (Human*, bool&)> func);
|
||||||
|
|
||||||
@ -31,9 +29,9 @@ class MoveableEntity : public RoomEntity
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
int updated_times_ = 0;
|
int updated_times_ = 0;
|
||||||
a8::Vec2 move_dir_;
|
|
||||||
a8::Vec2 attack_dir_;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
a8::Vec2 move_dir_;
|
||||||
|
a8::Vec2 attack_dir_;
|
||||||
std::set<GridCell*> grid_list_;
|
std::set<GridCell*> grid_list_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user