public static SingleRunStats Generate() { SingleRunStats result = new SingleRunStats(); result.Kills = FengGameManagerMKII.FGM.singleKills; result.TotalDamage = FengGameManagerMKII.FGM.singleTotal; result.MaxDamage = FengGameManagerMKII.FGM.singleMax; result.TimeStamp = (float)Math.Round(FengGameManagerMKII.FGM.logic.RoundTime, 4); result.FixedDeltaTime = UnityEngine.Time.fixedDeltaTime; result.GasRefillsCount = refills; result.Reloads = reloads; result.LastKillTime = lastKillTime; result.LastRefill = lastRefill; result.LastReload = lastReload; result.Stats = lastStats; result.Name = User.Name.Value.ToString().ToHTMLFormat(); return(result); }
private void OnLevelWasLoaded(int id) { if (Application.loadedLevelName == "menu") { if (!Background.IsActive) { Background.Enable(); } if (Chat != null && Chat.IsActive) { Chat.Disable(); Chat.Clear(); } if (Log != null && Log.IsActive) { Log.Disable(); Log.Clear(); } DestroyMainScene(); GameModes.ResetOnLoad(); Network.BanList.Save(); Skins.Humans.HumanSkin.Storage.Clear(); } else { if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single) { SingleRunStats.Reset(); } if (Background.IsActive) { Background.Disable(); } if (Application.loadedLevelName != "characterCreation" && Application.loadedLevelName != "SnapShot" && PhotonNetwork.inRoom) { if (Chat != null && !Chat.IsActive) { Chat.Enable(); } if (Log != null && !Log.IsActive) { Log.Enable(); } } } PhotonNetwork.player.SetCustomProperties(new ExitGames.Client.Photon.Hashtable { { PhotonPlayerProperty.anarchyFlags, 0 }, { PhotonPlayerProperty.anarchyAbuseFlags, 0 } }); PhotonNetwork.SetModProperties(); Pause?.Continue(); Settings.Apply(); VideoSettings.Apply(); if (PauseWindow.IsActive) { PauseWindow.DisableImmediate(); } if (StatsPanel.IsActive) { StatsPanel.DisableImmediate(); } }