// 创建子弹追踪实例
BulletHoming homing;

// 初始化
homing.Init();

// 启动
homing.Start();

// 游戏循环
while (game_running) {
    // 读取玩家数据
    float x, y, z, yaw, pitch, vx, vy, vz;
    int weapon = GetCurrentWeapon();
    int team = GetPlayerTeam();
    
    // 更新子弹追踪
    homing.UpdatePlayer(x, y, z, yaw, pitch, vx, vy, vz, weapon, team);
    
    // 处理射击事件
    if (IsKeyPressed(VK_LBUTTON)) {
        homing.OnKey(VK_LBUTTON, true);
    }
    
    // 处理开关
    if (IsKeyPressed(VK_H)) {
        homing.OnKey(VK_H, true);
    }
    
    // 获取子弹信息用于渲染
    auto bullets = homing.GetBullets();
    for (const auto& bullet : bullets) {
        DrawBulletTrail(bullet);
    }
    
    std::this_thread::sleep_for(std::chrono::milliseconds(1));
}

// 停止
homing.Stop();


////辞酱