#include "adapters/unity/chams/EftChamsGateway.h"

#include "adapters/unity/chams/resources/ChamsBundleRuntime.h"


namespace ta::adapters::unity::chams
{
void EftChamsGateway::application_tick(const ta::features::chams::ChamsSettings& settings)
{
    if (settings.needs_bundle())
        ta::adapters::unity::chams::ChamsBundleRuntime::instance().tick();
}

void EftChamsGateway::game_tick(const ta::features::chams::ChamsSettings& settings)
{
    const auto context = context_.snapshot();
    service_.update(context.game_world_class, context.game_world_instance, context.main_player, settings);
}

void EftChamsGateway::reset_session() noexcept
{
    service_.discard_session();
}
}
