コード例 #1
0
ファイル: RoundStartPatch.cs プロジェクト: NKHook/NKHook6
        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
        }
コード例 #2
0
        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
        }