update map infos function for all ia

This commit is contained in:
Bluub
2021-06-10 15:25:27 +02:00
parent 620812107b
commit 1a730dd581
4 changed files with 142 additions and 36 deletions
@@ -4,6 +4,8 @@
#pragma once
#include <vector>
#include "Map/MapInfo.hpp"
#include "System/System.hpp"
namespace BBM
@@ -14,10 +16,25 @@ namespace BBM
private:
//! @brief Reference to wal to get Views
WAL::Wal &_wal;
//! @brief Are the infos cached for current update
bool _cached;
//! @brief All blocks in the map
std::vector<MapInfo> _map;
//! @brief All players in the map
std::vector<MapInfo> _players;
//! @brief
void UpdateMapInfos(WAL::Entity entity);
public:
//! @inherit
void onFixedUpdate(WAL::ViewEntity<PositionComponent, ControllableComponent, IAControllableComponent> &entity) override;
//! @inherit
void onSelfUpdate() override;
//! @brief A default constructor
IAControllableSystem(WAL::Wal &wal);
//! @brief A keyboard system is copy constructable
@@ -26,5 +43,7 @@ namespace BBM
~IAControllableSystem() override = default;
//! @brief A keyboard system is assignable.
IAControllableSystem &operator=(const IAControllableSystem &) = default;
static bool isInExplosionRange(float x, float y, float z);
};
}