Pacman Torben Petré
Loading...
Searching...
No Matches
PacmanView Class Referencefinal

#include <PacmanView.h>

Inheritance diagram for PacmanView:
Collaboration diagram for PacmanView:

Public Member Functions

 PacmanView (const std::shared_ptr< logic::PacmanModel > &model)
 PacmanView renders & animates Pacman.
void resized () override
 Resizes the Pacman sprite.
void render () override
 Renders the Pacman sprite and the Pacman direction indicator.
Public Member Functions inherited from EntityView
 EntityView (const std::shared_ptr< logic::EntityModel > &model, float frameDuration)
bool shouldDelete () const
size_t getFrameIndex (float dt, size_t frameLimit)
 Calculates the current frameIndex based on the elapsed time.
Public Member Functions inherited from logic::Observer
virtual ~Observer ()=default

Additional Inherited Members

Protected Attributes inherited from EntityView
std::shared_ptr< logic::EntityModelmodel
sf::Sprite sprite
bool markedForDeletion = false
float frameDuration
float elapsedTime = 0
size_t frameIndex = 0

Constructor & Destructor Documentation

◆ PacmanView()

PacmanView::PacmanView ( const std::shared_ptr< logic::PacmanModel > & model)
explicit

PacmanView renders & animates Pacman.

Parameters
modelReference Model

Member Function Documentation

◆ render()

void PacmanView::render ( )
overridevirtual

Renders the Pacman sprite and the Pacman direction indicator.

Reimplemented from EntityView.

◆ resized()

void PacmanView::resized ( )
overridevirtual

Resizes the Pacman sprite.

Reimplemented from EntityView.


The documentation for this class was generated from the following files: