Пример #1
0
        internal void LoadCommon(IHUDTheme Theme = null)
        {
            if (Theme != null)
            {
                theme = Theme;
            }

            Viewport v = This.Game.GraphicsDevice.Viewport;

            scroller     = new TextScroller("scroller", theme);
            scroller.Pos = new Vector2(FrostbyteLevel.BORDER_WIDTH / 2,
                                       v.Height - scroller.GetAnimation().Height);
            scroller.Static = true;

            fader        = new TextFader("fader", theme);
            fader.Pos    = new Vector2(v.Width - 10, v.Height - 10 - 30);
            fader.Anchor = Orientations.Up_Right;
            fader.Static = true;

            #region ItemBag
            items        = new ItemArea("Items", theme);
            items.Pos    = new Vector2(890, 10);
            items.Static = true;
            #endregion
        }
Пример #2
0
        internal static void Load(Level context)
        {
            FrostbyteLevel l = context as FrostbyteLevel;
            l.Theme = Element.None;

            This.Game.AudioManager.AddBackgroundMusic("Music/CreditsBG");
            This.Game.AudioManager.PlayBackgroundMusic("Music/CreditsBG", 0.1f);

            Viewport v = This.Game.GraphicsDevice.Viewport;
            scroller = new TextScroller("intro_text", v.Width * 3 / 4, v.Height * 3 / 4);
            scroller.Pos.X = v.Width / 2.5f;
            scroller.Pos.Y = v.Height / 8;
            scroller.Static = true;

            StreamReader streamReader = new StreamReader("Content/Story/Credits.txt");
            string credits = streamReader.ReadToEnd();
            streamReader.Close();

            scroller.ScrollText(credits);

            if (GamePad.GetState(PlayerIndex.One).IsConnected)
            {
                gamePads.Add(new GamePadController(PlayerIndex.One));
            }
            if (GamePad.GetState(PlayerIndex.Two).IsConnected)
            {
                gamePads.Add(new GamePadController(PlayerIndex.Two));
            }
        }
Пример #3
0
        internal void LoadCommon(IHUDTheme Theme = null)
        {
            if (Theme != null)
            {
                theme = Theme;
            }

            Viewport v = This.Game.GraphicsDevice.Viewport;
            scroller = new TextScroller("scroller", theme);
            scroller.Pos = new Vector2(FrostbyteLevel.BORDER_WIDTH / 2,
                v.Height - scroller.GetAnimation().Height);
            scroller.Static = true;

            fader = new TextFader("fader", theme);
            fader.Pos = new Vector2(v.Width - 10, v.Height - 10 - 30);
            fader.Anchor = Orientations.Up_Right;
            fader.Static = true;

            #region ItemBag
            items = new ItemArea("Items", theme);
            items.Pos = new Vector2(890, 10);
            items.Static = true;
            #endregion
        }