Пример #1
0
        public SettingsMenu(ManageMenu m)
        {
            Manager = m;
            Init("settings");
            volumeText = "volume: " + volume;
            Button temp = ButtonList[0];

            temp.changeText(volumeText);
        }
Пример #2
0
        static void Main(string[] args)
        {
            SFML.Graphics.RenderWindow window = InitWindow();
            BackgroundManager          bg     = new BackgroundManager();
            Dialog      d      = new Dialog("1");
            Battlefield battle = new Battlefield(window);
            ManageMenu  menu   = new ManageMenu();

            while (window.IsOpen)
            {
                window.Clear();
                if (d.Active && !menu.Active)
                {
                    d.Update();
                }
                if (menu.Active)
                {
                    menu.Update();
                }
                if (!menu.Active && !d.Active)
                {
                    battle.Update();
                }


                window.Draw(bg);

                if (battle.Player.Life > 0)
                {
                    window.Draw(battle);
                }
                else
                {
                    battle      = new Battlefield(window);
                    menu.Active = true;
                    // d = new Dialog("1");
                }
                if (d.Active)
                {
                    window.Draw(d);
                }
                if (menu.Active)
                {
                    window.Draw(menu);
                }

                window.Display();
            }
        }
Пример #3
0
 public HelpMenu(ManageMenu m)
 {
     Manager    = m;
     helpSprite = new Sprite(new Texture(@"Resources/help.png"));
     Init("Help");
 }
Пример #4
0
 public CreditsMenu(ManageMenu m)
 {
     Manager = m;
     Init("Credits");
 }
Пример #5
0
 public MainMenu(ManageMenu m)
 {
     Manager = m;
     Init("Main_Menu");
 }