This commit is contained in:
aozhiwei 2019-06-13 09:14:17 +08:00
parent f32fbf92be
commit 0ee60f4442
2 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,7 @@ void Room::Init()
xtimer.Init(RoomXGetTickCount, this, 100, 100);
xtimer_attacher.xtimer = &xtimer;
grid_service.Init(MAP_WIDTH, MAP_HEIGHT, MAP_CELL_WIDTH);
map_service.Init(MAP_WIDTH / MAP_GRID_WIDTH, MAP_HEIGHT / MAP_GRID_WIDTH, MAP_GRID_WIDTH);
CreateThings();
stats_timer_ = a8::Timer::Instance()->AddRepeatTimer(
@ -94,6 +95,7 @@ void Room::UnInit()
}
removed_robot_hash_.clear();
grid_service.UnInit();
map_service.UnInit();
}
void Room::Update(int delta_time)

View File

@ -6,6 +6,7 @@
#include "frameevent.h"
#include "framemaker.h"
#include "gridservice.h"
#include "mapservice.h"
namespace MetaData
{
@ -45,6 +46,7 @@ public:
a8::XTimer xtimer;
Plane plane;
GridService grid_service;
MapService map_service;
long long battle_start_frameno_ = 0;
~Room();