24 lines
663 B
C++
24 lines
663 B
C++
#pragma once
|
|
|
|
#include "gridservice.h"
|
|
#include "roomentity.h"
|
|
|
|
class MoveableEntity : public RoomEntity
|
|
{
|
|
public:
|
|
virtual void Update(int delta_time) {};
|
|
int UpdatedTimes() { return updated_times_;}
|
|
std::set<GridCell*>& GetGridList() { return grid_list_; }
|
|
|
|
void TouchLayer0EntityList(std::function<void (Entity*, bool&)> func);
|
|
void TouchLayer1EntityList(std::function<void (Entity*, bool&)> func);
|
|
void TouchAllLayerEntityList(std::function<void (Entity*, bool&)> func);
|
|
void TouchAllLayerHumanList(std::function<void (Human*, bool&)> func);
|
|
|
|
protected:
|
|
int updated_times_ = 0;
|
|
|
|
private:
|
|
std::set<GridCell*> grid_list_;
|
|
};
|