FIX: SIGSEGV
This commit is contained in:
parent
5e580af16f
commit
bb75a3400a
@ -45,7 +45,7 @@ void GameLayer::onAttachImpl() {
|
||||
.gameMode = m_gameMode,
|
||||
.registry = m_entityRegistry,
|
||||
.camera = *m_camera,
|
||||
.boardLayout = boardLayout,
|
||||
.boardModel = m_assetManager.getModel("gameboard"),
|
||||
.eventBus = m_eventBus,
|
||||
.animationEventBus = getAnimationEventBus(),
|
||||
.pieceModels = pieceModels,
|
||||
|
||||
@ -84,7 +84,7 @@ ludo::GameController::LudoGameController::LudoGameController(
|
||||
m_registry,
|
||||
std::move(deps.pieceModels),
|
||||
std::move(deps.pieceSounds),
|
||||
deps.boardLayout
|
||||
std::move(deps.boardModel)
|
||||
),
|
||||
m_presentationGameState(*m_gameMode, m_gameMode->getState()),
|
||||
m_animationSystem(m_registry),
|
||||
|
||||
@ -20,7 +20,7 @@ namespace ludo::GameController {
|
||||
engine::EntityRegistry& registry;
|
||||
engine::Camera& camera;
|
||||
|
||||
ludo::BoardLayout& boardLayout;
|
||||
std::shared_ptr<engine::Model> boardModel;
|
||||
|
||||
engine::EventBus<ludo::LudoEvent>& eventBus;
|
||||
engine::EventBus<engine::animation::AnimationMarkerEvent>& animationEventBus;
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
namespace ludo {
|
||||
class PiecePresenter {
|
||||
public:
|
||||
PiecePresenter(engine::EventBus<engine::animation::AnimationMarkerEvent>& animationEventbus, engine::EntityRegistry& registry, std::unordered_map<std::string, std::shared_ptr<engine::Model>> pieceModels, std::unordered_map<std::string, std::shared_ptr<engine::audio::SoundBuffer>> pieceSounds, BoardLayout& layout)
|
||||
: m_registry(registry), m_pieceModels(std::move(pieceModels)), m_layout(layout), m_animationEventBus(animationEventbus), m_pieceSounds(std::move(pieceSounds)) {}
|
||||
PiecePresenter(engine::EventBus<engine::animation::AnimationMarkerEvent>& animationEventbus, engine::EntityRegistry& registry, std::unordered_map<std::string, std::shared_ptr<engine::Model>> pieceModels, std::unordered_map<std::string, std::shared_ptr<engine::audio::SoundBuffer>> pieceSounds, std::shared_ptr<engine::Model> boardModel)
|
||||
: m_registry(registry), m_pieceModels(std::move(pieceModels)), m_pieceSounds(std::move(pieceSounds)), m_layout(std::move(boardModel)), m_animationEventBus(animationEventbus) {}
|
||||
|
||||
void spawnPieces(const ludo::LudoGameState& state);
|
||||
void onPieceMoved(const ludo::PieceMovedEvent& event, const ludo::LudoGameState& state);
|
||||
@ -33,7 +33,7 @@ namespace ludo {
|
||||
engine::EntityRegistry& m_registry;
|
||||
std::unordered_map<std::string, std::shared_ptr<engine::Model>> m_pieceModels;
|
||||
std::unordered_map<std::string, std::shared_ptr<engine::audio::SoundBuffer>> m_pieceSounds;
|
||||
BoardLayout& m_layout;
|
||||
BoardLayout m_layout;
|
||||
std::vector<engine::Entity> m_pieceEntities;
|
||||
engine::EventBus<engine::animation::AnimationMarkerEvent>& m_animationEventBus;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user