Пример #1
0
    public static void Main()
    {
        Window     window     = new Window("RobotDodge", 800, 600);
        RobotDodge robotDodge = new RobotDodge(window);

        while (!window.CloseRequested && !robotDodge.Quit)
        {
            robotDodge.Draw();
            robotDodge.HandleInput();
            robotDodge.Update();
        }
    }
Пример #2
0
    public static void Main()
    {
        Window     gameWindow = new Window("Robot Dodge", 800, 420);
        RobotDodge game       = new RobotDodge(gameWindow);

        while (!gameWindow.CloseRequested)// & !game.Quit)
        {
            game.HandleInput();
            game.Draw();
            game.Update();
        }
    }
Пример #3
0
    public static void Main()
    {
        Window     gameWindow = new Window("Robot Dodge!", 800, 600);
        RobotDodge robotDodge = new RobotDodge(gameWindow);

        while (!SplashKit.QuitRequested() && !robotDodge.Quit)
        {
            SplashKit.ProcessEvents();
            robotDodge.HandleInput();
            robotDodge.Update();
            robotDodge.Draw();
        }
    }
Пример #4
0
    public static void Main()
    {
        Window     w    = new Window("Robot Dodge", 600, 600);
        RobotDodge robo = new RobotDodge(w);

        while (!w.CloseRequested && !robo.Quit)
        {
            SplashKit.ProcessEvents();
            robo.HandleInput();
            robo.Update();
            robo.Draw();
        }
    }
Пример #5
0
    public static void Main()
    {
        Window     game       = new Window("Cat & Mouse", 800, 600); //creating a new window 600 by 600 pixels
        RobotDodge robotDodge = new RobotDodge(game);

        //running the game till user closes the window or presses ESC key
        while (!game.CloseRequested && robotDodge.Quit != true)
        {
            SplashKit.ProcessEvents(); //calling procedure for processing events
            robotDodge.HandleInput();
            robotDodge.Update();
            robotDodge.Draw();
        }
        game.Close();                //closing the window once the user wants to quit
    }
Пример #6
0
    public static void Main()
    {
        myTimer.Start();
        Window     gameWindow = new Window("Game", 800, 600);
        RobotDodge robotDodge = new RobotDodge(gameWindow);

        while (!gameWindow.CloseRequested && robotDodge.Quit == false)
        {
            Score = Convert.ToInt32(myTimer.Ticks / 1000);
            SplashKit.ProcessEvents();
            robotDodge.HandleInput();
            robotDodge.Update();
            robotDodge.Draw();
        }
    }
Пример #7
0
    public static void Main()
    {
        Window     gameWindow = new Window("Robot Dodge", 600, 600);
        Player     player     = new Player(gameWindow);
        RobotDodge game       = new RobotDodge(gameWindow, player);


        while ((!gameWindow.CloseRequested) && (!player.Quit))
        {
            SplashKit.ProcessEvents();
            game.HandleInput();
            game.Draw();
            game.Update();
            game.RandomRobot();
        }
    }
Пример #8
0
    // static Player _player;
    public static void Main()
    {
        _gameWindow = new Window("RodgeWindow", 800, 800);
        _gameWindow.Clear(Color.White);

        _robotDodge = new RobotDodge(_gameWindow);

        while (!_gameWindow.CloseRequested)
        {
            SplashKit.ProcessEvents();
            _robotDodge.Draw();
            _robotDodge.HandleInput();
            _robotDodge.Update();
            if (_robotDodge.Quit == true)
            {
                break;
            }
        }
        _gameWindow.Close();
        _gameWindow = null;
    }
Пример #9
0
    public static void Main()
    {
        Window     w          = new Window("Player window", 800, 600);
        RobotDodge robotDodge = new RobotDodge(w);
        Timer      timer      = new Timer("My Timer");

        timer.Start();

        while (!w.CloseRequested && !robotDodge.Quit && robotDodge.Lives != 0)
        {
            robotDodge.HandleInput();
            robotDodge.Update(timer);
            robotDodge.Draw();
            SplashKit.Delay(100);
        }

        if (robotDodge.Lives == 0)
        {
            GameOver(w);
        }

        w.Close();
        w = null;
    }