예제 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public GameplayScreen(Game game, string uri)
        {
            //TransitionOnTime = TimeSpan.FromSeconds(1.5);
            //TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Keys[] { Keys.Escape },
                true);

            bloom = new Bloom(game);
            game.Components.Add(bloom);

            this.game = game;

            enemyList = new List<Enemy>();
            level = new LevelManager(uri);
            level.Initialize();
        }
예제 #2
0
파일: MenuScreen.cs 프로젝트: SundeepK/Geom
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Keys[] { Keys.Up },
                true);
            menuDown = new InputAction(
                new Keys[] { Keys.Down },
                true);
            menuSelect = new InputAction(
                new Keys[] { Keys.Enter, Keys.Space },
                true);
            menuCancel = new InputAction(
                new Keys[] { Keys.Escape },
                true);
        }
예제 #3
0
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public MessageBoxScreen(string message, bool includeUsageText)
        {
            const string usageText = "\n Enter to accept" +
                                     "\n Esc to cancel";

            if (includeUsageText)
                this.message = message + usageText;
            else
                this.message = message;

            IsPopup = true;

            //TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Keys[] { Keys.Space, Keys.Enter, Keys.A },
                true);
            menuCancel = new InputAction(
                new Keys[] { Keys.Escape, Keys.Back },
                true);
        }