Beispiel #1
0
        static void Main(string[] args)
        {
            EngineWindow window = new EngineWindow();

            Graphics.SetClearColor(Color4.Blue);

            State state = new GameState(Graphics.RenderMode.Perspective, false);

            //push the state to the state stack - top state is the state that runs
            StateHandler.Push(state);

            Sound sound = Assets.GetSound("Main loop.wav");
            //sound.Play();

            window.Run(30.0f);
        }
Beispiel #2
0
        void HandleGameState()
        {
            switch (curr)
            {

                case EGameState.None:
                    window.Close();
                    break;
                case EGameState.TitleScreen:
                    state = new TitleScreen();
                    state.LoadContent();
                    state.Initialize();
                    break;
                case EGameState.Map1:
                    state = new Map01();
                    state.LoadContent();
                    state.Initialize();
                    gTime.resettime();
                    break;
                default:
                    break;
            }
        }