#pragma once #include #include #include "../../entity.hpp" #include "../../render/canvas.hpp" #include "../../resources.hpp" namespace game::state::play { class Text { int index{}; int updateDelay{}; int baseDelay{}; int currentDelay{}; bool isFinished{}; bool isTerminal{}; bool isStartEffectsApplied{}; bool isBlipQueued{}; bool isSceneActive{}; bool isAnimationEntryStarted{}; float animationEntryTimePrevious{}; std::string defaultAnimationOnEnd{}; void default_animation_on_end_play(Entity&); public: static constexpr auto LIFETIME = 10.0f; resource::xml::Schema::Element* entry{}; bool isEnabled{true}; float time{}; void set(resource::xml::Schema::Element*, Entity&, bool isInterruptible = true, bool isSequenceAdvance = false, std::string defaultAnimationOnEnd = {}); void update(Entity&, Canvas&); bool is_interruptible() const; bool is_finished() const; bool is_terminal() const; bool is_scene_active() const; }; }