refactor: 同步化 Actor/Environment/Audio 快照还原接口

This commit is contained in:
2026-06-22 14:48:14 +08:00
parent 6a289e0255
commit e2bdd8e0fa
3 changed files with 5 additions and 8 deletions
@@ -95,7 +95,7 @@ namespace AibisDream.Kit
return dto;
}
public IEnumerator RestoreSnapshot(AudioSnapshotDto data)
public void RestoreSnapshot(AudioSnapshotDto data)
{
foreach (var musicEvent in _musicDict.Values)
{
@@ -136,7 +136,6 @@ namespace AibisDream.Kit
ChangeAmb(ambState);
}
yield break;
}
public void PauseAll()
@@ -86,9 +86,9 @@ namespace AibisDream
return dto;
}
public IEnumerator RestoreSnapshot(ActorSnapshotDto dto)
public void RestoreSnapshot(ActorSnapshotDto dto)
{
if (dto?.actors == null) yield break;
if (dto?.actors == null) return;
DestroyEditorTemp();
@@ -122,7 +122,6 @@ namespace AibisDream
ApplyActorVisualState(actor, actorData);
}
yield break;
}
private static void ApplyActorVisualState(AbsActor actor, ActorData data)
@@ -39,9 +39,9 @@ namespace AibisDream
};
}
public IEnumerator RestoreSnapshot(EnvironmentSnapshotDto dto)
public void RestoreSnapshot(EnvironmentSnapshotDto dto)
{
if (dto == null) yield break;
if (dto == null) return;
if (!Enum.TryParse<TimesOfDay>(dto.curTime, out var time))
{
@@ -63,7 +63,6 @@ namespace AibisDream
SetWeather(weather);
}
yield break;
}
public void InitEnvironment(TimesOfDay timeOfDay, Weather weather)