Пример #1
0
        public Title(GraphicsDeviceManager graphicsDeviceManager)
            : base(graphicsDeviceManager)
        {
            background = new Picture(Game.content.Load <Texture2D>("Textures\\Pictures\\title"), Vector2.Zero, null);

            newgame          = new Text(Game.content.Load <SpriteFont>("Fonts\\medival big"), new Vector2(80f, 550f), Color.Orange, "New Game", null, new Vector2(20, 20));
            loadgame         = new Text(Game.content.Load <SpriteFont>("Fonts\\medival big"), new Vector2(80f, 700f), Color.Orange, "Continue", null, new Vector2(20, 20));
            loadgame.opacity = 50;
            quit             = new Text(Game.content.Load <SpriteFont>("Fonts\\medival big"), new Vector2(80f, 850f), Color.Orange, "Quit", null, new Vector2(20, 20));

            backgroundParticals = new ParticalManager(ParticalManager.ParticalsMovement.xy, 100, Game.worldRect, new Vector2(6, 6), 0, 1, Color.Yellow, Color.WhiteSmoke, 100, 0);
            fire = new Fire(new Rectangle(50, 50, 400, 400));

            Rectangle newRect = newgame.bounds;

            newRect.Y      += newRect.Height - 30;
            newRect.Height  = 20;
            cursorParticals = new ParticalManager(ParticalManager.ParticalsMovement.xy, 1000, newRect, new Vector2(40, 40), 0, 4, Color.Black, Color.OrangeRed, 50, 25);

            music = Game.content.Load <Song>("Audio\\Themes\\title theme");

            if (!shutUp)
            {
                MediaPlayer.Play(music);
            }
        }
Пример #2
0
 public Fire(Rectangle rect)
 {
     flame = new ParticalManager(ParticalManager.ParticalsMovement.xy, (rect.Width * rect.Height) / 100, rect, new Vector2(30, 30), 0, 10, Color.Red, Color.OrangeRed, 50, 25);
     hole  = new Rectangle(100, 100, 200, 200);
     timer = new Timer(3000f);
 }