51 lines
3.1 KiB
C#
51 lines
3.1 KiB
C#
|
|
// WL813_Score.cs — #813m 채점 프로브 진입점 (기준서 v1 §E 채점표 24항목 1:1 로그)
|
||
|
|
//
|
||
|
|
// unity command run_script --file AgentScripts/WL813_Score.cs --entry WL813_Score.Run --args '[60]' // 60 s 샘플 시작(비차단)
|
||
|
|
// unity command run_script --file AgentScripts/WL813_Score.cs --entry WL813_Score.Status // 진행 상황
|
||
|
|
// unity command run_script --file AgentScripts/WL813_Score.cs --entry WL813_Score.Result // 끝난 뒤 표 전문
|
||
|
|
// unity command run_script --file AgentScripts/WL813_Score.cs --entry WL813_Score.Summary // 한 줄 요약 + 파일 경로
|
||
|
|
// unity command run_script --file AgentScripts/WL813_Score.cs --entry WL813_Score.RunAt --args '[60,0.5]' // 샘플 주기 지정
|
||
|
|
// unity command run_script --file AgentScripts/WL813_Score.cs --entry WL813_Score.Stop // 조기 종료 후 표 기록
|
||
|
|
//
|
||
|
|
// 결과 파일: Screenshots_WL/Score/score_<HHmmss>.txt (Assets 밖 · 미추적)
|
||
|
|
//
|
||
|
|
// 실제 계측·채점 로직은 `Assets/WL/Tools/WL813_ScoreProbe.cs`(에디터 전용 · 컴파일 게이트 대상)에 있고
|
||
|
|
// 이 파일은 run_script 진입점만 노출한다. Play 중에만 동작하며 게임 상태·에셋을 수정하지 않는다.
|
||
|
|
//
|
||
|
|
// 🔴 `Run` 은 즉시 돌아온다(비차단). 샘플이 끝나기 전에 `Result` 를 부르면 "(running)" 이 나온다 —
|
||
|
|
// `Status` 로 남은 시간을 보고 기다린 뒤 `Result` 를 부른다.
|
||
|
|
// 🔴 CLI 명령(`wl_info` 등)은 802c 소관이라 여기서 다시 만들지 않는다. 적 수·timeScale·HP 확인은 `unity command wl_info`.
|
||
|
|
|
||
|
|
using WL.Tools;
|
||
|
|
|
||
|
|
public static class WL813_Score
|
||
|
|
{
|
||
|
|
/// <summary>seconds 초 동안 샘플 → §E 24항목 표 기록. 0 이하면 기본 60 s.</summary>
|
||
|
|
public static object Run(float seconds) { return WL813_ScoreProbe.Start(seconds, 0f); }
|
||
|
|
|
||
|
|
/// <summary>샘플 주기(초)까지 지정. 기본 1 s(기준서 §E 의 1 s 샘플).</summary>
|
||
|
|
public static object RunAt(float seconds, float sampleInterval) { return WL813_ScoreProbe.Start(seconds, sampleInterval); }
|
||
|
|
|
||
|
|
/// <summary>진행 상황(경과 · 프레임 · 샘플 수 · Killed/Spawned).</summary>
|
||
|
|
public static object Status() { return WL813_ScoreProbe.Status(); }
|
||
|
|
|
||
|
|
/// <summary>완료된 표 전문(§E 24항목). 콘솔에도 같은 내용이 남는다.</summary>
|
||
|
|
public static object Result()
|
||
|
|
{
|
||
|
|
var t = WL813_ScoreProbe.LastTable;
|
||
|
|
return string.IsNullOrEmpty(t) ? WL813_ScoreProbe.LastResult : t;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>한 줄 요약(제안 합계 · 「미확인」 수 · 파일 경로).</summary>
|
||
|
|
public static object Summary()
|
||
|
|
{
|
||
|
|
return WL813_ScoreProbe.LastResult
|
||
|
|
+ " | proposed=" + WL813_ScoreProbe.LastProposedTotal
|
||
|
|
+ " unknown=" + WL813_ScoreProbe.LastUnknownCount
|
||
|
|
+ " path=" + WL813_ScoreProbe.LastPath;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>진행 중인 샘플을 조기 종료하고 지금까지의 표를 쓴다.</summary>
|
||
|
|
public static object Stop() { return WL813_ScoreProbe.Stop(); }
|
||
|
|
}
|