Пример #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);
        }
Пример #2
0
        public void Start(GameMode mode)
        {
            Round.StartHeight    = StaticDisplay.DisplayHeight;
            Round.StartWidth     = StaticDisplay.DisplayWidth;
            StaticDisplay.FPSCap = 150;
            Textures.LoadTextures();
            Round.LoadLevels();
            Round.CurrentLevel = Round.Levels[0];
            Round.PlayerOne    = new Human();

            StaticDisplay.AddResizeListener(Resize);
            StaticMouse.AddMouseDownListener(MouseDown);
            StaticKeyboard.AddKeyDownListener(KeyDown);
        }
Пример #3
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);
        }
Пример #4
0
        public void Start(GameMode mode)
        {
            Round.StartHeight    = StaticDisplay.DisplayHeight;
            Round.StartWidth     = StaticDisplay.DisplayWidth;
            StaticDisplay.FPSCap = 80;
            Textures.LoadTextures();
            Round.LoadLevels();
            Round.CurrentLevel = Round.Levels[1];
            Round.PlayerOne    = new Human();
            Spider spider  = new Spider(new RectangleF(200, 400, 80, 80));
            Spider spider1 = new Spider(new RectangleF(800, 400, 80, 80));
            Spider spider2 = new Spider(new RectangleF(600, 400, 80, 80));
            Spider spider3 = new Spider(new RectangleF(1000, 400, 80, 80));

            StaticDisplay.AddResizeListener(Resize);
            StaticMouse.AddMouseDownListener(MouseDown);
            StaticKeyboard.AddKeyDownListener(KeyDown);
        }