1
This commit is contained in:
parent
f32fbf92be
commit
0ee60f4442
@ -42,6 +42,7 @@ void Room::Init()
|
|||||||
xtimer.Init(RoomXGetTickCount, this, 100, 100);
|
xtimer.Init(RoomXGetTickCount, this, 100, 100);
|
||||||
xtimer_attacher.xtimer = &xtimer;
|
xtimer_attacher.xtimer = &xtimer;
|
||||||
grid_service.Init(MAP_WIDTH, MAP_HEIGHT, MAP_CELL_WIDTH);
|
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();
|
CreateThings();
|
||||||
stats_timer_ = a8::Timer::Instance()->AddRepeatTimer(
|
stats_timer_ = a8::Timer::Instance()->AddRepeatTimer(
|
||||||
@ -94,6 +95,7 @@ void Room::UnInit()
|
|||||||
}
|
}
|
||||||
removed_robot_hash_.clear();
|
removed_robot_hash_.clear();
|
||||||
grid_service.UnInit();
|
grid_service.UnInit();
|
||||||
|
map_service.UnInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Room::Update(int delta_time)
|
void Room::Update(int delta_time)
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "frameevent.h"
|
#include "frameevent.h"
|
||||||
#include "framemaker.h"
|
#include "framemaker.h"
|
||||||
#include "gridservice.h"
|
#include "gridservice.h"
|
||||||
|
#include "mapservice.h"
|
||||||
|
|
||||||
namespace MetaData
|
namespace MetaData
|
||||||
{
|
{
|
||||||
@ -45,6 +46,7 @@ public:
|
|||||||
a8::XTimer xtimer;
|
a8::XTimer xtimer;
|
||||||
Plane plane;
|
Plane plane;
|
||||||
GridService grid_service;
|
GridService grid_service;
|
||||||
|
MapService map_service;
|
||||||
long long battle_start_frameno_ = 0;
|
long long battle_start_frameno_ = 0;
|
||||||
|
|
||||||
~Room();
|
~Room();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user