Exemple #1
0
        public void Start(GameMode mode)
        {
            StaticDisplay.AddResizeListener(Resize);

            StaticMouse.AddMouseDownListener(MouseDown);
            StaticMouse.AddMouseUpListener(MouseUp);
            StaticMouse.AddMouseWheelListener(MouseWheel);

            StaticKeyboard.AddKeyDownListener(KeyDown);
            StaticKeyboard.AddKeyUpListener(KeyUp);
            ChangeScreen(GuiGameMenu);
        }
Exemple #2
0
        void IGameInstance.Start(GameMode mode)
        {
            Auto._globalStepFactor = (double)Config.gameTickBase / Config.gameTicksPS;

            Auto.objects = new ObjBox[Config.maxObjs];

            Auto.player1 = new Point(0, 0);
            for (int i = 0; i < Auto.objects.Length; i++)
            {
                Auto.objects[i] = new ObjBox(Config.rand.Next(-500, 500), Config.rand.Next(-500, 500));
            }


            StaticKeyboard.AddKeyUpListener(Events.KeyUp);
            StaticKeyboard.AddKeyDownListener(Events.KeyDown);
            StaticMouse.AddMouseDownListener(Events.MouseClick);
            StaticMouse.AddMouseWheelListener(Events.MouseWheel);
        }