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