Use provider-native runtime access in menus
This commit is contained in:
parent
7a298cf95d
commit
3d48c762de
6 changed files with 98 additions and 52 deletions
|
|
@ -62,22 +62,51 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return ResolveClient(AetheriaUnityRuntimePaths.RuntimeStateFilePath, runtimeId);
|
||||
}
|
||||
|
||||
public static AetheriaClient RuntimeClient(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return ResolveClient(stateBoot, runtimeId);
|
||||
}
|
||||
|
||||
public static AetheriaClientState RuntimeState(string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(runtimeId).State;
|
||||
}
|
||||
|
||||
public static AetheriaClientState RuntimeState(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(stateBoot, runtimeId).State;
|
||||
}
|
||||
|
||||
public static AetheriaControl Control(string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(runtimeId).Control;
|
||||
}
|
||||
|
||||
public static AetheriaControl Control(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(stateBoot, runtimeId).Control;
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(string runtimeId = "")
|
||||
where TDocument : class
|
||||
{
|
||||
return RuntimeState(runtimeId).Reactive<TDocument>();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
where TDocument : class
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).Reactive<TDocument>();
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(
|
||||
AetheriaRuntimeRtsViewportBounds viewport,
|
||||
string runtimeId = "")
|
||||
|
|
@ -86,6 +115,15 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return RuntimeState(runtimeId).Reactive<TDocument>(viewport);
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
AetheriaRuntimeRtsViewportBounds viewport,
|
||||
string runtimeId = "")
|
||||
where TDocument : class
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).Reactive<TDocument>(viewport);
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(
|
||||
int index,
|
||||
string runtimeId = "")
|
||||
|
|
@ -94,6 +132,15 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return RuntimeState(runtimeId).Reactive<TDocument>(index);
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
int index,
|
||||
string runtimeId = "")
|
||||
where TDocument : class
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).Reactive<TDocument>(index);
|
||||
}
|
||||
|
||||
public static AetheriaClient CurrentClientForStateFile(string stateFilePath)
|
||||
{
|
||||
foreach (var pair in RuntimeClients)
|
||||
|
|
|
|||
Loading…
Reference in a new issue