Ejemplo n.º 1
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));
            }
        }
Ejemplo n.º 2
0
        internal static void Load(Level context)
        {
            FrostbyteLevel l = context as FrostbyteLevel;

            l.Theme = Element.None;

            l.DiaryEntries = LevelFunctions.LoadLevelNotes(l.Name).GetEnumerator();
            l.DiaryEntries.MoveNext();

            This.Game.AudioManager.AddBackgroundMusic("Music/TitleScreenBG");
            This.Game.AudioManager.PlayBackgroundMusic("Music/TitleScreenBG", 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 / 8;
            scroller.Pos.Y  = v.Height / 8;
            scroller.Static = true;
            scroller.ScrollText(l.DiaryEntries.Current);


            if (GamePad.GetState(PlayerIndex.One).IsConnected)
            {
                gamePads.Add(new GamePadController(PlayerIndex.One));
            }
            if (GamePad.GetState(PlayerIndex.Two).IsConnected)
            {
                gamePads.Add(new GamePadController(PlayerIndex.Two));
            }
        }