Пример #1
0
		public static void load(LevelInfo newInfo)
		{
			Level._isEditor = false;
			Level._isDevkit = false;
			Level.isExiting = false;
			Level._info = newInfo;
			LoadingUI.updateScene();
			SceneManager.LoadScene("Game");
			if (!Dedicator.isDedicated)
			{
				string text = Level.info.name.ToLower();
				if (text != null)
				{
					if (!(text == "germany"))
					{
						if (!(text == "hawaii"))
						{
							if (!(text == "pei"))
							{
								if (!(text == "russia"))
								{
									if (!(text == "yukon"))
									{
										if (text == "washington")
										{
											Provider.provider.achievementsService.setAchievement("Washington");
										}
									}
									else
									{
										Provider.provider.achievementsService.setAchievement("Yukon");
									}
								}
								else
								{
									Provider.provider.achievementsService.setAchievement("Russia");
								}
							}
							else
							{
								Provider.provider.achievementsService.setAchievement("PEI");
							}
						}
						else
						{
							Provider.provider.achievementsService.setAchievement("Hawaii");
						}
					}
					else
					{
						Provider.provider.achievementsService.setAchievement("Peaks");
					}
				}
			}
			Provider.updateRichPresence();
			DevkitTransactionManager.resetTransactions();
		}
Пример #2
0
 private void Start()
 {
     if (!Dedicator.isDedicated)
     {
         MenuSettings.load();
         GraphicsSettings.resize();
         LoadingUI.updateScene();
     }
 }
Пример #3
0
		public static void edit(LevelInfo newInfo, bool Devkit)
		{
			Level._isEditor = true;
			Level._isDevkit = Devkit;
			Level.isExiting = false;
			Level._info = newInfo;
			LoadingUI.updateScene();
			SceneManager.LoadScene("Game");
			Provider.updateRichPresence();
			DevkitTransactionManager.resetTransactions();
		}
Пример #4
0
		public static void exit()
		{
			if (Level.onLevelExited != null)
			{
				Level.onLevelExited();
			}
			if (!Level.isEditor && Player.player != null && PlayerUI.window != null && Level.info != null && PlayerUI.window.totalTime > 60f)
			{
				int fpsMin = PlayerUI.window.fpsMin;
				int fpsMax = PlayerUI.window.fpsMax;
				int num = (int)((float)PlayerUI.window.totalFrames / PlayerUI.window.totalTime);
				string value = (!Level.info.canAnalyticsTrack) ? "Workshop" : Level.info.name;
				Dictionary<string, object> dictionary = new Dictionary<string, object>
				{
					{
						"FPS_Min",
						fpsMin
					},
					{
						"FPS_Max",
						fpsMax
					},
					{
						"FPS_Avg",
						num
					},
					{
						"Map",
						value
					},
					{
						"Network",
						Provider.clients.Count > 1
					}
				};
				Analytics.CustomEvent("Perf", dictionary);
			}
			Level._isEditor = false;
			Level._isDevkit = false;
			Level.isExiting = true;
			Level._info = null;
			LoadingUI.updateScene();
			SceneManager.LoadScene("Menu");
			Provider.updateRichPresence();
			DevkitTransactionManager.resetTransactions();
		}