sevenx_engine 0.2.11

Engine de jogos 2D/3D completa com suporte Android, física, áudio, partículas, tilemap, UI, eventos e sistema 3D avançado com PBR.
Documentation
# Script de Logs Android - SevenX Engine
# Monitora logs do aplicativo em tempo real

Write-Host "📱 SevenX Engine - Monitor de Logs Android" -ForegroundColor Cyan
Write-Host "===========================================" -ForegroundColor Cyan
Write-Host ""

# Verifica se adb está disponível
if (!(Get-Command adb -ErrorAction SilentlyContinue)) {
    Write-Host "❌ ADB não encontrado!" -ForegroundColor Red
    exit 1
}

# Lista dispositivos
$devices = adb devices | Select-String -Pattern "^\w+" | Where-Object { $_ -notmatch "List of devices" }

if ($devices.Count -eq 0) {
    Write-Host "❌ Nenhum dispositivo conectado!" -ForegroundColor Red
    exit 1
}

# Selecionar dispositivo se houver múltiplos
$deviceId = $null

if ($devices.Count -eq 1) {
    $parts = $devices[0].ToString().Split("`t")
    $deviceId = $parts[0].Trim()
    $model = (adb -s $deviceId shell getprop ro.product.model 2>$null).Trim()
    Write-Host "✅ Dispositivo: $model" -ForegroundColor Green
} else {
    Write-Host "📱 Dispositivos encontrados:" -ForegroundColor Yellow
    Write-Host ""
    
    $deviceList = @()
    $index = 1
    
    foreach ($line in $devices) {
        $parts = $line.ToString().Split("`t")
        if ($parts.Count -ge 2 -and $parts[1].Trim() -eq "device") {
            $id = $parts[0].Trim()
            $model = (adb -s $id shell getprop ro.product.model 2>$null).Trim()
            
            $deviceList += @{ Index = $index; Id = $id; Model = $model }
            Write-Host "$index. $model ($id)" -ForegroundColor White
            $index++
        }
    }
    
    Write-Host ""
    $choice = Read-Host "Escolha o dispositivo (1-$($deviceList.Count))"
    $choiceNum = [int]$choice
    
    if ($choiceNum -lt 1 -or $choiceNum -gt $deviceList.Count) {
        Write-Host "❌ Escolha inválida!" -ForegroundColor Red
        exit 1
    }
    
    $deviceId = $deviceList[$choiceNum - 1].Id
}

Write-Host ""
Write-Host "===========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "📊 Monitorando logs (Ctrl+C para parar)..." -ForegroundColor Yellow
Write-Host ""

# Limpa logs antigos
adb -s $deviceId logcat -c 2>$null

# Monitora logs com filtros
# Mostra apenas logs relevantes do SevenX Engine
adb -s $deviceId logcat -v time | ForEach-Object {
    $line = $_
    
    # Filtros para logs relevantes
    if ($line -match "SevenX|RustStdoutStderr|RUST|rust|panic|ERROR|FATAL|AndroidRuntime") {
        # Colorir por tipo
        if ($line -match "ERROR|FATAL|panic") {
            Write-Host $line -ForegroundColor Red
        }
        elseif ($line -match "WARN|WARNING") {
            Write-Host $line -ForegroundColor Yellow
        }
        elseif ($line -match "SevenX|RUST") {
            Write-Host $line -ForegroundColor Cyan
        }
        elseif ($line -match "DEBUG") {
            Write-Host $line -ForegroundColor Gray
        }
        else {
            Write-Host $line -ForegroundColor White
        }
    }
}