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

            temp.changeText(volumeText);
        }
Beispiel #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();
            }
        }
Beispiel #3
0
 public HelpMenu(ManageMenu m)
 {
     Manager    = m;
     helpSprite = new Sprite(new Texture(@"Resources/help.png"));
     Init("Help");
 }
Beispiel #4
0
 public CreditsMenu(ManageMenu m)
 {
     Manager = m;
     Init("Credits");
 }
Beispiel #5
0
 public MainMenu(ManageMenu m)
 {
     Manager = m;
     Init("Main_Menu");
 }