예제 #1
0
파일: DamGame.cs 프로젝트: mjatalaya/sv2015
        static void Main(string[] args)
        {
            bool fullScreen = false;

            Hardware.Init(1024, 768, 24, fullScreen);
            bool finished = false;

            while (!finished)
            {
                WelcomeScreen welcome = new WelcomeScreen();
                welcome.Run();

                if (welcome.GetOptionChosen() == WelcomeScreen.options.Credits)
                {
                    CreditsScreen credits = new CreditsScreen();
                    credits.Run();
                }

                if (welcome.GetOptionChosen() == WelcomeScreen.options.Play)
                {
                    Game myGame = new Game();
                    myGame.Run();

                    GameOverScreen gameEnd = new GameOverScreen();
                    gameEnd.Run();
                }

                if (welcome.GetOptionChosen() == WelcomeScreen.options.Quit)
                {
                    finished = true;
                }
            }
        }
예제 #2
0
    public static void Main(string[] args)
    {
        bool fullScreen = false;

        SdlHardware.Init(960, 750, 24, fullScreen);

        WelcomeScreen w = new WelcomeScreen();

        do
        {
            w.Run();
            if (w.GetChosenOption() == 1)
            {
                Game g = new Game();
                g.Run();
            }
            else if (w.GetChosenOption() == 2)
            {
                HelpScreen help = new HelpScreen();
                help.Run();
            }
            else if (w.GetChosenOption() == 3)
            {
                CreditsScreen credits = new CreditsScreen();
                credits.Run();
            }
        } while (w.GetChosenOption() != 4);
    }
예제 #3
0
파일: Matrix.cs 프로젝트: liarte/C-Sharp
    static void Main(string[] args)
    {
        bool fullScreen = false;

        Hardware.Init(1024, 768, 24, fullScreen);
        bool finished = false;

        while (!finished)
        {
            WelcomeScreen welcome = new WelcomeScreen();
            welcome.Run();

            if (welcome.GetOptionChosen() == WelcomeScreen.options.Credits)
            {
                CreditsScreen credits = new CreditsScreen();
                credits.Run();
            }

            if (welcome.GetOptionChosen() == WelcomeScreen.options.Play)
            {
                // Matrix myMatrix = new Matrix();
                //myMatrix.Run();
            }

            if (welcome.GetOptionChosen() == WelcomeScreen.options.Quit)
            {
                finished = true;
            }
        }
    }
예제 #4
0
    public static void Main()
    {
        bool fullScreen = false;

        SdlHardware.Init(1024, 720, 24, fullScreen);

        WelcomeScreen w = new WelcomeScreen();

        do
        {
            w.Run();
            if (w.GetChosenOption() == 1)
            {
                Game g = new Game();
                g.Run();
            }
            else if (w.GetChosenOption() == 2)
            {
                CreditsScreen credits = new CreditsScreen();
                credits.Run();
            }
            else if (w.GetChosenOption() == 3)
            {
                HelpScreen help = new HelpScreen();
                help.Run();
            }
            else if (w.GetChosenOption() == 4)
            {
                ScoreBoard sb = new ScoreBoard();
                sb.Run();
            }
        } while (w.GetChosenOption() != 5);
    }
예제 #5
0
    static void Main()
    {
        bool fullScreen = false;

        SdlHardware.Init(1024, 768, 24, fullScreen);

        WelcomeScreen w = new WelcomeScreen();

        do
        {
            w.Run();
            if (w.GetChosenOption() == WelcomeScreen.OPTION_PLAY)
            {
                Game g = new Game();
                g.Run();
            }
            else if (w.GetChosenOption() == WelcomeScreen.OPTION_HELP)
            {
                HelpScreen help = new HelpScreen();
                help.Run();
            }
            else if (w.GetChosenOption() == WelcomeScreen.OPTION_CREDITS)
            {
                CreditsScreen credits = new CreditsScreen();
                credits.Run();
            }
        }while (w.GetChosenOption() != WelcomeScreen.OPTION_QUIT);
    }
예제 #6
0
    public void Run()
    {
        welcomeScreen = new WelcomeScreen();
        welcomeScreen.Run();
        Game game = new Game();

        game.Run();
    }
예제 #7
0
    public static void Run()
    {
        WelcomeScreen welcome = new WelcomeScreen();

        welcome.Run();
        MenuScreen menu = new MenuScreen();

        menu.Run();
    }
예제 #8
0
    static void Main()
    {
        Console.SetWindowSize(MAXX + 1, MAXY + 1);
        Console.SetBufferSize(MAXX + 1, MAXY + 1);
        Console.Title = "Phoenix";

        WelcomeScreen ws = new WelcomeScreen();

        ws.Run();
    }
예제 #9
0
    // Operations

    public void Run()
    {
        while (true) //  ;-)
        {
            myWelcomeScreen = new WelcomeScreen();
            myWelcomeScreen.Run();

            myGame = new Game();
            myGame.Run();
        }
    }
예제 #10
0
    public void Start()
    {
        Hardware             hardware = new Hardware(1024, 720, 24, false);
        WelcomeScreen        welcome  = new WelcomeScreen(hardware);
        LanguageSelectScreen languaje = new LanguageSelectScreen(hardware);

        welcome.Run();
        languaje.Run();
        MenuScreen menu = new MenuScreen(hardware, languaje.languaje);

        do
        {
            GameScreen    game    = new GameScreen(hardware);
            HelpScreen    help    = new HelpScreen(hardware, languaje.languaje);
            StatsScreen   stats   = new StatsScreen(hardware, languaje.languaje);
            CreditsScreen credits = new CreditsScreen(hardware, languaje.languaje);

            Player   p = Player.GetPlayer();
            DateTime begin;
            DateTime timeEnd;

            hardware.ClearScreen();
            menu.exit   = false;
            menu.option = -1;
            Console.WriteLine("Menu");
            menu.Run();

            switch (menu.option)
            {
            case 0:
                help.Run();
                begin = DateTime.Now;
                game.Run();
                timeEnd = DateTime.Now;
                TimeSpan       time = timeEnd - begin;
                GameOverScreen end  = new GameOverScreen(hardware, time, languaje.languaje);
                end.Run();
                break;

            case 1:
                stats.Run();
                break;

            case 2:
                credits.Run();
                break;
            }
            Thread.Sleep(50);
        } while (menu.option != 3 ||
                 hardware.IsKeyPressed(Hardware.KEY_ESC));
    }
예제 #11
0
    public void Run()
    {
        Hardware      hardware = new Hardware(1000, 600, 24, false);
        WelcomeScreen welcome  = new WelcomeScreen(hardware);
        MenuScreen    menu     = new MenuScreen(hardware);

        welcome.Run();
        bool exit = false;

        do
        {
            menu.Run();
            switch (menu.GetChosenOption())
            {
            case MenuScreen.MenuOption.Game:
                NumPlayersScreen nps = new NumPlayersScreen(hardware);
                nps.Run();
                GameScreen game = new GameScreen(hardware,
                                                 nps.NumPlayers, nps.NumsToken);
                game.Run();
                break;

            case MenuScreen.MenuOption.Load:
                LoadScreen ls = new LoadScreen(hardware);
                ls.Run();
                break;

            case MenuScreen.MenuOption.Credits:
                CreditsScreen cs = new CreditsScreen(hardware);
                cs.Run();
                break;

            case MenuScreen.MenuOption.ChangeLenguage:
                ChangeLenguageScreen cls =
                    new ChangeLenguageScreen(hardware);
                cls.Run();
                break;

            case MenuScreen.MenuOption.Exit:
                exit = true;
                break;
            }
        }while (!exit);
    }
예제 #12
0
    static void Main()
    {
        bool fullScreen = false;

        SdlHardware.Init(1024, 700, 24, fullScreen);

        ChooseLanguage l = new ChooseLanguage();
        WelcomeScreen  w = new WelcomeScreen();

        do
        {
            if (l.GetChosenOption() == 0)
            {
                l.Run();
            }
            if (l.GetChosenOption() != 0)
            {
                w.Run();
                if (w.GetChosenOption() == 1)
                {
                    Game g = new Game();
                    g.Run();
                }
                else if (w.GetChosenOption() == 2)
                {
                    Controls controls = new Controls();
                    controls.Run();
                }
                else if (w.GetChosenOption() == 3)
                {
                    CreditsScreen credits = new CreditsScreen();
                    credits.Run();
                }
                else if (w.GetChosenOption() == 5)
                {
                    Tricks tricks = new Tricks();
                    tricks.Run();
                }
            }
        }while (w.GetChosenOption() != 4);
    }
예제 #13
0
    static void Main()
    {
        Inicialize();

        SdlHardware.Init(1200, 768, 24, FullScreen);
        WelcomeScreen w = new WelcomeScreen();

        os = new OptionsScreen();
        LoadGamesScreen lg = new LoadGamesScreen();
        HelpScreen      hs = new HelpScreen();

        int option;

        do
        {
            option = w.Run();
            switch (option)
            {
            case 0: break;

            case 1: g = new Game();  g.Run();
                break;

            case 2:
                if (lg.Run() == 0)
                {
                    g.Run();
                }
                break;

            case 3: os.Run();
                SaveOptions();
                SdlHardware.Init(1200, 768, 24, FullScreen);
                break;

            case 4: hs.Run();
                break;
            }
        } while (option != 5);
    }
예제 #14
0
    public static void Main(string[] args)
    {
        SdlHardware.Init(1280, 720, 24, false);

        LoadingScreen ls = new LoadingScreen();

        ls.Run();

        WelcomeScreen welcome = new WelcomeScreen();

        do
        {
            welcome.Run();
            if (welcome.GetChosenOption() == WelcomeScreen.OPTION_PLAY)
            {
                Game g = new Game();
                g.Run();
                EndScreen end = new EndScreen();
                end.Run();
            }
            else if (welcome.GetChosenOption() == WelcomeScreen.OPTION_HELP)
            {
                HelpScreen help = new HelpScreen();
                help.Run();
            }
            else if (welcome.GetChosenOption() == WelcomeScreen.OPTION_CREDITS)
            {
                CreditsScreen credits = new CreditsScreen();
                credits.Run();
            }
            else if (welcome.GetChosenOption() == WelcomeScreen.OPTION_CONFIG)
            {
                ConfigScreen config = new ConfigScreen();
                config.Run();
            }
        }while (welcome.GetChosenOption() != WelcomeScreen.OPTION_QUIT);
    }