예제 #1
0
        public Window(StackGame game) : base()
        {
            Game = game;

            Log.AddLogger(new DebugLogHandler());
            Log.WriteLine("Loading game settings");

            GameSettings = GameSettings.LoadFromConfigFile(Game.SaveGameFolder);

            Log.WriteLine("Initializing graphics");

            Graphics = GameSettings.CreateGraphicsDeviceManager(this);

            Window.ClientSizeChanged += OnClientSizeChanged;
            Window.AllowUserResizing  = true;
            Window.Title              = game.Title;

            SkipText     = new SkipText();
            SkipCutscene = new SkipCutscene(SetSpeed);
        }
예제 #2
0
        public void HandleSkipInputEvent(InputEvent input)
        {
            if (input.Handled)
            {
                return;
            }

            if (input.Type == InputEventType.MouseUp && StackEngine.Game.World != null)
            {
                if (!StackEngine.Game.World.Interactive)
                {
                    SkipText.Start();
                    input.Handled = true;
                }
            }

            if (input.Type == InputEventType.KeyUp && input.IsKeyPress(Keys.Escape) &&
                StackEngine.Game.World != null && !StackEngine.Game.World.Interactive)
            {
                SkipCutscene.Start();
                input.Handled = true;
            }
        }