12#ifndef ZOAPPPLAYERLOCAL_H
13#define ZOAPPPLAYERLOCAL_H
15#include "toymaker/sim_system.hpp"
28 PlayerLocal(): SimObjectAspect<PlayerLocal>{0} {}
29 inline static std::string getSimObjectAspectTypeName() {
return "UrPlayerLocal"; }
30 static std::shared_ptr<BaseSimObjectAspect> create(
const nlohmann::json& jsonAspectProperties);
31 std::shared_ptr<BaseSimObjectAspect>
clone()
const override;
92 *
this,
"MovePromptedObserved",
101 *
this,
"LaunchPieceAttemptedObserved",
110 *
this,
"MovePieceAttemptedObserved",
119 *
this,
"NextTurnAttemptedObserved",
128 *
this,
"DiceRollAttemptedObserved",
ToyMaker::SignalObserver mObserveEndTurnAttempted
Observer of the end turn event, generated by the game's UI layer.
Definition ur_player_local.hpp:118
void onActivated() override
Prompts UrController to create and hand over controls that this player can then use to interact with ...
Definition ur_player_local.cpp:14
ToyMaker::SignalObserver mObserveDiceRollAttempted
Observerr of the dice roll event, generated by the game's UI layer.
Definition ur_player_local.hpp:127
ToyMaker::SignalObserver< PieceTypeID, glm::u8vec2 > mObservePieceLaunchAttempted
Observer of the launch piece event generated by the game's UI layer.
Definition ur_player_local.hpp:100
std::string mControllerPath
The path to the UrController in this scene, from which this aspect will receive its game controls.
Definition ur_player_local.hpp:38
ToyMaker::SignalObserver< GamePhaseData > mObserveMovePrompted
Observer of prompt move events generated by the game's UrController.
Definition ur_player_local.hpp:91
std::shared_ptr< BaseSimObjectAspect > clone() const override
A method which must be overridden to specify how a new aspect should be constructed as a copy of this...
Definition ur_player_local.cpp:8
ToyMaker::Signal< PlayerID > mSigControlInterface
Signal emitted when this player has been prompted for an action, and should take control of the UI an...
Definition ur_player_local.hpp:136
void onMoveBoardPieceAttempted(PieceIdentity piece)
Attempts to move a piece situated somewhere on the board to a new location based on the current dice ...
Definition ur_player_local.cpp:35
ToyMaker::SignalObserver< PieceIdentity > mObserveMovePieceAttempted
Observer of the move piece event, generated by the game's 3D scene layer.
Definition ur_player_local.hpp:109
std::unique_ptr< UrPlayerControls > mControls
The controls returned by UrController, used to interact with the game data model.
Definition ur_player_local.hpp:44
void onMovePrompted(GamePhaseData phaseData)
Callback issued by UrController when this player is required to take action.
Definition ur_player_local.cpp:39
void onLaunchPieceAttempted(PieceTypeID pieceType, glm::u8vec2 location)
Attempts to launch a game piece to some location.
Definition ur_player_local.cpp:23
void onNextTurnAttempted()
Attempts to advance the game by a turn, ending the current turn.
Definition ur_player_local.cpp:27
void onDiceRollAttempted()
Attempts to roll the dice.
Definition ur_player_local.cpp:31
A SignalObserver object, which can subscribe to Signals matching its data signature and receive signa...
Definition signals.hpp:412
A Signal object, designed to emit signals matching some data signature to be received by all the Sign...
Definition signals.hpp:323
An object containing closely related methods and data, and exposing object lifecycle and application ...
Definition sim_system.hpp:956
PieceTypeID
Enum listing the different types of pieces present in the game.
Definition piece_type_id.hpp:22
Data returned by GameOfUrModel when queried about the current phase of the game.
Definition model.hpp:112
Data uniquely identifying a piece used in the game.
Definition piece.hpp:29
Contains the class definition for UrController, the aspect responsible for managing and reporting the...