<commit_before>#include <SFML-Book/client/Entity.hpp>
#include <SFML-Book/client/Component.hpp>
#include <SFML-Book/client/Team.hpp>
#include <SFML-Book/client/Level.hpp>

#include <SFML-Book/common/FuncIds.hpp>
#include <SFML-Book/common/Configuration.hpp>

ES_INIT_ENTITY(book::Entity);

namespace book
{
    Entity::Entity(sfutils::EntityManager<Entity>* manager,std::uint32_t id) : sfutils::Entity<Entity>(manager,id), onHit(nullptr), onHitted(nullptr)
    {
        name = "???";
    }

    sf::Vector2f Entity::getPosition()const
    {
        return component<CompSkin>()->_sprite.getPosition();
    }

    void Entity::setPosition(const sf::Vector2f& pos)
    {
        component<CompSkin>()->_sprite.setPosition(pos);
    }

    void Entity::draw(sf::RenderTarget& target,sf::RenderStates states)const
    {
        target.draw(component<CompSkin>()->_sprite,states);

        CompHp::Handle hp = component<CompHp>();
        if(hp.isValid())
        {
            hp->draw(target,states);
        }<commit_msg>add focus for realtime event<commit_after>#include <SFML-Book/client/Entity.hpp>
#include <SFML-Book/client/Component.hpp>
#include <SFML-Book/client/Team.hpp>
#include <SFML-Book/client/Level.hpp>

#include <SFML-Book/common/FuncIds.hpp>
#include <SFML-Book/common/Configuration.hpp>

ES_INIT_ENTITY(book::Entity);

namespace book
{
    Entity::Entity(sfutils::EntityManager<Entity>* manager,std::uint32_t id) : sfutils::Entity<Entity>(manager,id), onHit(nullptr), onHitted(nullptr)
    {
        name = "???";
    }

    sf::Vector2f Entity::getPosition()const
    {
        return component<CompSkin>()->_sprite.getPosition();
    }

    void Entity::setPosition(const sf::Vector2f& pos)
    {
        component<CompSkin>()->_sprite.setPosition(pos);
    }

    void Entity::draw(sf::RenderTarget& target,sf::RenderStates states)const
    {
        target.draw(component<CompSkin>()->_sprite,states);

        CompHp::Handle hp = component<CompHp>();
        if(hp.isValid())
        {
            hp->update(getPosition())
            hp->draw(target,states);
        }
{'fraction_non_alphanumeric': 0.16149068322981366, 'fraction_numerical': 0.003822264691829909, 'mean_word_length': 3.7056179775280897, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2757280', 'n_tokens_mistral': 708, 'n_tokens_neox': 699, 'n_words': 87}