internal static void Prefix(UnityToSimulation __instance) { IGameInstance gameInstance = NGameInstance.GetGame(); int currentRound = __instance.simulation.GetSpawnedRound() + 1; var o = new GameEvents.RoundStartEvent(gameInstance, currentRound); //Create RoundStartEvent instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it }
internal static void Prefix(InGame __instance) { IGameInstance gameInstance = NGameInstance.GetGame(); int currentRound = __instance.bridge.simulation.GetSpawnedRound(); var o = new GameEvents.RoundEndEvent(gameInstance, currentRound); //Create RoundEndEvent instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it }