|
|
@@ -12,7 +12,7 @@ namespace GamecraftModdingAPI.Events |
|
|
|
/// <summary> |
|
|
|
/// Event emitter engine for switching to to build mode. |
|
|
|
/// </summary> |
|
|
|
public class GameStateBuildEmitterEngine : IEventEmitterEngine, IInitializeOnBuildStart |
|
|
|
public class GameStateBuildEmitterEngine : IEventEmitterEngine, IUnorderedInitializeOnTimeStoppedModeEntered |
|
|
|
{ |
|
|
|
public string Name { get; } = "GamecraftModdingAPIGameStateBuildEventEmitter" ; |
|
|
|
|
|
|
@@ -37,13 +37,13 @@ namespace GamecraftModdingAPI.Events |
|
|
|
public void EmitIfBuildMode() |
|
|
|
{ |
|
|
|
//Logging.MetaDebugLog($"nextSimulationMode: {entitiesDB.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode}"); |
|
|
|
if (entitiesDB.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.Build) |
|
|
|
if (entitiesDB.QueryUniqueEntity<SimulationModeStateEntityStruct>(SimulationModeStateExclusiveGroups.GAME_STATE_GROUP).nextSimulationMode == SimulationMode.TimeStopped) |
|
|
|
{ |
|
|
|
Emit(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public JobHandle OnInitializeBuildMode() |
|
|
|
|
|
|
|
public JobHandle OnInitializeTimeStoppedMode() |
|
|
|
{ |
|
|
|
Emit(); |
|
|
|
return default(JobHandle); |
|
|
|