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

#include <GhostView.h>

Inheritance diagram for GhostView:
Collaboration diagram for GhostView:

Public Member Functions

 GhostView (const std::shared_ptr< logic::GhostModel > &model, int spriteY)
 GhostView renders & animates Ghosts.
void render () override
 Renders the Ghost sprite.
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.
virtual void resized ()
 Determines how the sprites should react when the Screen dimension changes.
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

◆ GhostView()

GhostView::GhostView ( const std::shared_ptr< logic::GhostModel > & model,
int spriteY )
explicit

GhostView renders & animates Ghosts.

Parameters
modelReference model
spriteYUsed to differentiate between Ghost sprites (Blinky, Pinky, Inky, Clyde)

Member Function Documentation

◆ render()

void GhostView::render ( )
overridevirtual

Renders the Ghost sprite.

Reimplemented from EntityView.


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