|
Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
The class responsible for managing the 3D representation and interactions of a game in progress. More...
#include <ur_scene_view.hpp>
Public Member Functions | |
| std::shared_ptr< BaseSimObjectAspect > | clone () const override |
| const GameOfUrModel & | getModel () const |
| const BoardLocations & | getBoard () const |
Static Public Member Functions | |
| static std::string | getSimObjectAspectTypeName () |
| static std::shared_ptr< BaseSimObjectAspect > | create (const nlohmann::json &jsonAspectProperties) |
Public Attributes | |
| ToyMaker::SignalObserver< glm::u8vec2 > | mObserveBoardClicked |
| ToyMaker::SignalObserver< PieceTypeID > | mObserveLaunchPieceInitiated |
| ToyMaker::SignalObserver | mObserveLaunchPieceCancelled |
| ToyMaker::SignalObserver< MoveResultData > | mObserveMoveMade |
| ToyMaker::SignalObserver< PlayerID > | mObserveControlInterface |
| ToyMaker::Signal< PieceTypeID, glm::u8vec2 > | mSigLaunchPieceAttempted |
| ToyMaker::Signal< PieceIdentity > | mSigMovePieceAttempted |
| ToyMaker::SignalObserver | mObserveControllerReady |
| ToyMaker::Signal< std::string > | mSigViewSubscribed {*this, "ViewSubscribed"} |
| ToyMaker::SignalObserver | mObserveViewUpdateStarted |
| ToyMaker::Signal< std::string > | mSigViewUpdateCompleted |
Private Types | |
| enum class | Mode { GENERAL , LAUNCH_POSITION_SELECTION , TRANSITION } |
Private Member Functions | |
| void | onControllerReady () |
| void | onBoardClicked (glm::u8vec2 boardLocation) |
| void | onLaunchPieceInitiated (PieceTypeID piece) |
| void | onLaunchPieceCanceled () |
| void | onMoveMade (const MoveResultData &moveResultData) |
| void | onViewUpdateStarted () |
| void | onControlInterface (PlayerID player) |
| void | onActivated () override |
| void | variableUpdate (uint32_t variableStepMillis) override |
Private Attributes | |
| std::map< PieceIdentity, std::string > | mPieceModelMap {} |
| std::map< PieceIdentity, std::shared_ptr< ToyMaker::SceneNode > > | mPieceNodeMap {} |
| std::weak_ptr< ToyMaker::SimObject > | mGameOfUrController {} |
| std::weak_ptr< ToyMaker::SimObject > | mGameOfUrBoard {} |
| std::priority_queue< UrPieceAnimationKey > | mAnimationKeys {} |
| uint32_t | mAnimationTimeMillis {} |
| std::string | mControllerPath {} |
| Mode | mMode { Mode::GENERAL } |
| PlayerID | mControlledBy {} |
The class responsible for managing the 3D representation and interactions of a game in progress.
Displays the game board and adds game pieces to it per the current state of the game. The state of the game is read from the game data model (or from changes broadcasted by UrController).
Converts board or game piece clicks into actions usable by the currently active player controller. Also reports view updates (like animations that play after a game state change) to the game controller.
| ToyMaker::SignalObserver<glm::u8vec2> UrSceneView::mObserveBoardClicked |
| ToyMaker::SignalObserver<PlayerID> UrSceneView::mObserveControlInterface |
| ToyMaker::SignalObserver UrSceneView::mObserveControllerReady |
| ToyMaker::SignalObserver UrSceneView::mObserveLaunchPieceCancelled |
| ToyMaker::SignalObserver<PieceTypeID> UrSceneView::mObserveLaunchPieceInitiated |
| ToyMaker::SignalObserver<MoveResultData> UrSceneView::mObserveMoveMade |
| ToyMaker::SignalObserver UrSceneView::mObserveViewUpdateStarted |
| ToyMaker::Signal<PieceTypeID, glm::u8vec2> UrSceneView::mSigLaunchPieceAttempted |
| ToyMaker::Signal<PieceIdentity> UrSceneView::mSigMovePieceAttempted |
| ToyMaker::Signal<std::string> UrSceneView::mSigViewUpdateCompleted |