Example #1
0
        public static void Unityd()
        {
            FileSystem fs = new FileSystem();

            string directory = $@"{fs.RootDirectory}\Screenshots\";

            if (!Directory.Exists(directory))
            {
                Directory.CreateDirectory(directory);
            }

            string filename = string.Format("{0} by {1} - {2}", G.Sys.GameManager_.Level_.Name_, G.Sys.GameManager_.LevelSettings_.LevelCreatorName_, System.DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"));

            foreach (char c in System.IO.Path.GetInvalidFileNameChars())
            {
                filename = filename.Replace(c, ' ');
            }

            bool filealreadyexists = File.Exists($@"{directory}\{filename}.png");

            UnityEngine.Application.CaptureScreenshot($@"{directory}\{filename}.png");

            if (!filealreadyexists)
            {
            }
            string title       = "Unityd - " + G.Sys.GameManager_.LevelSettings_.LevelName_;
            string description = "Screenshot saved.";

            NotificationBox.Notification n = new NotificationBox.Notification(title, description, NotificationBox.NotificationType.Car, 6f);
            NotificationBox.Show(n, false);
        }
Example #2
0
        public static void ShowResults()
        {
            if (timer is null || timer == null || notificationcount > 0)
            {
                Stop();
                return;
            }
            NotificationBox.Notification n = new NotificationBox.Notification("Run results", $"{Timer.GetTime(false, 3, true)}", NotificationBox.NotificationType.Campaign, "MeetYourRival");
            NotificationBox.Show(n, true);
            notificationcount += 1;

            Stop();
            return;

            string message = $"Run time: {Timer.GetTime()}";

            G.Sys.MenuPanelManager_.ShowYesNo(message, "SEEDRUN MODE", () => {
                Console.WriteLine("TEST");
            });
        }
Example #3
0
 private static void LevelStats()
 {
     NotificationBox.Notification n = new NotificationBox.Notification($"{G.Sys.GameManager_.LevelName_}", $"{Timer.GetTime(true, 3)}", NotificationBox.NotificationType.Campaign, "WorldTraveller");
     NotificationBox.Show(n, false);
 }