Beispiel #1
0
 internal static void ProcessCurrentTogglesSP(bool enemiesAllowed, bool gravestonesAllowed, bool itemsBanned, bool timePaused)
 {
     EnemiesToggledByServer?.Invoke(enemiesAllowed);
     GravestonesToggleByServer?.Invoke(gravestonesAllowed);
     ItemBannerToggleByServer?.Invoke(itemsBanned);
     TimePausedOrResumedByServer?.Invoke(timePaused);
 }
Beispiel #2
0
        private static void ProcessEnemiesToggled(ref BinaryReader reader)
        {
            if (Network.NetworkMode == NetworkMode.Server)
            {
                return;
            }
            bool enemiesCanSpawn = reader.ReadBoolean();

            EnemiesToggledByServer?.Invoke(enemiesCanSpawn);
        }
Beispiel #3
0
        // TODO, singleplayer
        private static void ProcessCurrentToggles(ref BinaryReader reader)
        {
            if (Network.NetworkMode == NetworkMode.Server)
            {
                return;
            }
            bool enemiesAllowed = reader.ReadBoolean();

            EnemiesToggledByServer?.Invoke(enemiesAllowed);

            bool timePaused = reader.ReadBoolean();

            TimePausedOrResumedByServer?.Invoke(timePaused);

            bool gravestonesAllowed = reader.ReadBoolean();

            GravestonesToggleByServer?.Invoke(gravestonesAllowed);

            bool itemsBanned = reader.ReadBoolean();

            ItemBannerToggleByServer?.Invoke(itemsBanned);
        }