Pacman Torben Petré
Loading...
Searching...
No Matches
logic::EntityModel Class Reference

#include <EntityModel.h>

Inheritance diagram for logic::EntityModel:
Collaboration diagram for logic::EntityModel:

Public Member Functions

 EntityModel (float normalizedX, float normalizedY)
 Base class for entities.
 ~EntityModel () override=default
float getX () const
float getY () const
Public Member Functions inherited from logic::Subject
virtual ~Subject ()=default
void attach (const std::shared_ptr< Observer > &observer)
 Attaches an observer to this Subject.
void notify (Events event)
 Call the Observer update function with the provided event.

Protected Attributes

float x
float y
Protected Attributes inherited from logic::Subject
std::list< std::weak_ptr< Observer > > observers

Constructor & Destructor Documentation

◆ EntityModel()

EntityModel::EntityModel ( float normalizedX,
float normalizedY )
explicit

Base class for entities.

Parameters
normalizedXNormalized initial X coordinate
normalizedYNormalized initial Y coordinate

◆ ~EntityModel()

logic::EntityModel::~EntityModel ( )
overridedefault

Member Function Documentation

◆ getX()

float EntityModel::getX ( ) const
nodiscard
Returns
normalized X coordinate

◆ getY()

float EntityModel::getY ( ) const
nodiscard
Returns
normalized Y coordinate

Member Data Documentation

◆ x

float logic::EntityModel::x
protected

◆ y

float logic::EntityModel::y
protected

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