4#include <SFML/Graphics/Sprite.hpp>
30 [[nodiscard]]
size_t getFrameIndex(
float dt,
size_t frameLimit);
46 std::shared_ptr<logic::EntityModel>
model;
bool markedForDeletion
Definition EntityView.h:49
sf::Sprite sprite
Definition EntityView.h:47
bool shouldDelete() const
Definition EntityView.cpp:27
float elapsedTime
Definition EntityView.h:53
size_t frameIndex
Definition EntityView.h:54
virtual void resized()
Determines how the sprites should react when the Screen dimension changes.
Definition EntityView.cpp:11
size_t getFrameIndex(float dt, size_t frameLimit)
Calculates the current frameIndex based on the elapsed time.
Definition EntityView.cpp:31
std::shared_ptr< logic::EntityModel > model
Definition EntityView.h:46
EntityView(const std::shared_ptr< logic::EntityModel > &model, float frameDuration)
Definition EntityView.cpp:6
virtual void render()
Determines what needs to happen to sprites when they should be rendered.
Definition EntityView.cpp:18
float frameDuration
Definition EntityView.h:52