public void DeactivateShip()
    {
        ShipRunning = false;
        HudElements.SetActive(false);

        GearScript.GearText.text = "";
    }
Beispiel #2
0
        public static void HideInLiv()
        {
            HudElements elements = Configuration.PluginConfig.Instance.LIV.elements;

            if (!elements.combo)
            {
                Combo.layer = 23;
            }
            else
            {
                Combo.layer = 5;
            }

            if (!elements.score)
            {
                Score.layer = 23;
            }
            else
            {
                Score.layer = 5;
            }

            if (!elements.rank)
            {
                Rank.layer = 23;
            }
            else
            {
                Rank.layer = 5;
            }

            if (!elements.multiplier)
            {
                Multiplier.layer = 23;
            }
            else
            {
                Multiplier.layer = 5;
            }

            if (!elements.progress)
            {
                Progress.layer = 23;
            }
            else
            {
                Progress.layer = 5;
            }

            if (!elements.health)
            {
                Health.layer = 23;
            }
            else
            {
                Health.layer = 5;
            }
        }
    public void ActivateShip()
    {
        HudElements.SetActive(true);

        ShipRunning = true;
        Ignition.GetComponent <BoxCollider>().enabled = false;

        GearScript.GearText.text = "Gear: " + GearScript.CurrentGear;

        if (GearScript.CurrentGear == 0)
        {
            GearScript.GearText.text = "Gear: N";
        }
    }
    public void Death()
    {
        MasterAudio.PlaySoundAndForget("Death_screen");
        MasterAudio.StopAllPlaylists();
        MasterAudio.StopAllOfSound("EngineLoop");
        MasterAudio.StopAllOfSound("JumpJetLoopR");
        MasterAudio.StopAllOfSound("JumpJetLoopL");
        MasterAudio.StopAllOfSound("strafeloopL");
        MasterAudio.StopAllOfSound("strafeloopR");
        MasterAudio.StopAllOfSound("HL_FireLoop");
        HudElements.SetActive(false);
        Dead        = true;
        ShipRunning = false;

        Time.timeScale = 0;
        GameOverScreen.SetActive(true);
    }
Beispiel #5
0
        /// <summary>
        /// Unloads all mod data.
        /// </summary>
        public void Close()
        {
            if (init)
            {
                TryCloseMenu();
                Config.Save(GetConfig());
            }

            init      = false;
            initStart = false;

            Binds?.Close();
            Cmd?.Close();
            Menu?.Close();
            Config?.Close();
            Log?.Close();
            HudElements?.Close();
            Settings?.Close();
            Instance = null;
        }
Beispiel #6
0
 /// <summary>
 /// Draws hud elements.
 /// </summary>
 public void Draw() =>
 HudElements?.Draw();
Beispiel #7
0
        private static bool DisplayHudItem(HudElements HudItem)
        {
            bool Passed = false;

            switch (HudItem)
            {
            /*
             * case HudElements.splashScreen:
             *  DisplayHudItem(HudElements.mainBorder);
             *  Console.SetCursorPosition(GetScreenCenterWidthBasedOnTextSize("Embers of The Flames RPG"), GetScreenCenterHeight() - 8);
             *  WriteColor(ConsoleColor.Red, DefaultConsoleBackgroundColor, "Embers of The Flames RPG", true);
             *  Thread.Sleep(1 * 250);
             *  Console.SetCursorPosition(GetScreenCenterWidthBasedOnTextSize("Created By PyroFlames"), GetScreenCenterHeight() - 7);
             *  WriteColor(ConsoleColor.DarkRed, DefaultConsoleBackgroundColor, "Created By PyroFlames", true);
             *  Console.SetCursorPosition(GetScreenCenterWidthBasedOnTextSize(">                  "), GetScreenCenterHeight() - 5);
             *  Console.Write(">");
             *  break;
             * case HudElements.mainMenu:
             *  DisplayHudItem(HudElements.mainBorder);
             *  DisplayHudItem(HudElements.hudHeader);
             *  DisplayHudItem(HudElements.hudfooter);
             *  Console.SetCursorPosition(GetScreenCenterWidthBasedOnTextSize("Embers of The Flames RPG"), 2);
             *  WriteColor(ConsoleColor.Red, DefaultConsoleBackgroundColor, "Embers of The Flames RPG", true);
             *
             *  CreateMenuList(new string[] { "New Game", "Load Game", "Options", "Update", "Exit" }, 1, new int[] { 0, 10 }, true, false, true);
             *
             *  SetTypingPos();
             *  CreateTypingZone(">", ConsoleColor.White, ConsoleColor.White);
             *  break;
             * case HudElements.optionsMenu:
             *  DisplayHudItem(HudElements.mainBorder);
             *  DisplayHudItem(HudElements.hudHeader);
             *  DisplayHudItem(HudElements.hudfooter);
             *  Console.SetCursorPosition(GetScreenCenterWidthBasedOnTextSize("Embers of The Flames RPG"), 2);
             *  WriteColor(ConsoleColor.Red, DefaultConsoleBackgroundColor, "Embers of The Flames RPG", true);
             *
             *  CreateMenuList(new string[] { "Typing Color", "Text Speed", "Music", "Volume", "Back" }, 1, new int[] { 0, 10 }, true, false, true);
             *
             *  SetTypingPos();
             *  CreateTypingZone(">", ConsoleColor.White, ConsoleColor.White);
             *  break;
             */
            case HudElements.Crosshair:
                DrawLine(true, 50, "|", GameAreaCords[GameAreaCordLabel.TopCenter]);
                DrawLine(false, 150, "-", GameAreaCords[GameAreaCordLabel.LeftCenter]);
                break;

            case HudElements.MainGameBorder:
                DrawLine(true, 51, "|", new int[] { 4, 11 });
                DrawLine(true, 51, "|", new int[] { 155, 11 });
                DrawLine(false, 152, "-", new int[] { 4, 11 });
                DrawLine(false, 152, "-", new int[] { 4, 62 });
                break;

            case HudElements.MainBorder:
                DrawLine(true, WindowHeight - 2, "|", new int[] { 0, 1 });
                DrawLine(true, WindowHeight - 2, "|", new int[] { WindowWidth - 1, 1 });
                DrawLine(false, WindowWidth, "-", new int[] { 0, 0 });
                DrawLine(false, WindowWidth, "-", new int[] { 0, WindowHeight - 2 });
                break;

            case HudElements.HudHeader:
                DrawLine(false, WindowWidth - 2, "-", new int[] { 1, 4 });
                break;

            case HudElements.HudFooter:
                DrawLine(false, WindowWidth - 2, "-", new int[] { 1, WindowHeight - 6 });
                break;

            case HudElements.SideMenu1:
                DrawLine(true, WindowHeight - 11, "|", new int[] { WindowWidth - 40, 5 });
                DrawLine(true, 3, "|", new int[] { WindowWidth - 40, 1 });
                break;

            case HudElements.SideMenu2:
                DrawLine(true, WindowHeight - 11, "|", new int[] { WindowWidth - 40, 5 });
                DrawLine(true, WindowHeight - 11, "|", new int[] { WindowWidth - 80, 5 });
                DrawLine(true, 3, "|", new int[] { WindowWidth - 80, 1 });
                break;

            case HudElements.Stats:
                break;

            case HudElements.Inventory:
                break;

            case HudElements.PlayerInfo:
                break;
            }

            return(Passed);
        }