Exemple #1
0
        static Game()
        {
            window  = new Window(1280, 600, "Run!", false);
            gravity = 400.0f;
            window.SetVSync(false);

            //scenes creation
            PlayScene playScene = new PlayScene();

            //scenes config

            CurrentScene = playScene;
            CurrentScene.Start();


            string[] joysticks = Game.window.Joysticks;

            for (int i = 0; i < joysticks.Length; i++)
            {
                if (joysticks[i] != null && joysticks[i] != "Unmapped Controller")
                {
                    NumJoysticks++;
                }
            }
        }
Exemple #2
0
        //static AudioSource backGround;
        //static AudioClip intro;

        static Game()
        {
            //backGround = new AudioSource();
            //intro = new AudioClip("Assets/Music/intro.wav");

            //backGround.Play(intro);

            window  = new Window(1280, 700, "Run!", false);
            gravity = 400.0f;
            window.SetVSync(false);



            //scenes creation
            PlayScene playScene = new PlayScene();
            //PlayScene2 playScene2 = new PlayScene2();
            GameOverScene gameOverScene = new GameOverScene();

            playScene.NextScene = gameOverScene;
            //gameOverScene.NextScene =playScene2;
            //playScene2.NextScene = gameOverScene;


            //scenes config

            CurrentScene = playScene;
            CurrentScene.Start();



            string[] joysticks = Game.window.Joysticks;

            for (int i = 0; i < joysticks.Length; i++)
            {
                if (joysticks[i] != null && joysticks[i] != "Unmapped Controller")
                {
                    NumJoysticks++;
                }
            }
        }