public MenuAbout(Game1 game, ScreenManager screenManager, DeviceManager dev)
     : base(game, screenManager, dev)
 {
     bg = GameLib.getInstance().get(TextureE.aboutScreen);
     b = new Button(new Vector2(Game1.width - 400, Game1.height - 300), new Vector2(300, 300), TextureE.back);
     b.Focus = true;
 }
Esempio n. 2
0
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     GameLib.getInstance(this, spriteBatch);
     GameLib.getInstance().loadSounds();
     deviceManager = DeviceFactory.getDeviceManager(this);
     screenManager = new ScreenManager(this, deviceManager);
     Components.Add(deviceManager);
 }
        public ConnectionScreen(Game1 game, ScreenManager screenManager, DeviceManager dev)
            : base(game, screenManager, dev)
        {
            GameLib.getInstance().loadGUITextures();
            Texture2D bText = GameLib.getInstance().get(TextureE.connect);
            b = new Button(new Vector2(Game1.width / 2 - bText.Width / 2, Game1.height / 2 - bText.Height / 2), new Vector2(400, 400), TextureE.connect);
            b.Focus = true;

            deviceManager = game.DeviceManager;
        }
 public MenuLevels(Game1 game, ScreenManager screenManager, DeviceManager dev)
     : base(game, screenManager, dev)
 {
     logo = GameLib.getInstance().get(TextureE.logo);
     buttons = new Button[]
     {
         new Button(new Vector2(Game1.width/2 - 300/2 , 0), new Vector2(300, 300),TextureE.easy),
         new Button(new Vector2(Game1.width/2 - 300/2 , 100), new Vector2(300, 300),TextureE.medium),
         new Button(new Vector2(Game1.width/2 - 300/2 , 200), new Vector2(300, 300),TextureE.hard),
         new Button(new Vector2(Game1.width/2 - 300/2 , 350), new Vector2(300, 300),TextureE.back)
     };
     buttons[selected].Focus = true;
 }
Esempio n. 5
0
 public World(Game1 game, ScreenManager screenManager, DeviceManager dev, int level)
     : base(game, screenManager, dev)
 {
     points = 0;
     currentDistance = 0;
     GameLib.getInstance().loadGameTextures();
     objs = new List<PhysicsObject>();
     setVariables(level);
     mountains = new MountainCtrl(worldLength, horizontalVel);
     waters = new WaterCtrl(worldLength, horizontalVel);
     bMountain = new BackMountain(new Vector2(0, 0f));
     monster = new Monster(player, this);
     gameState = GameState.playing;
     bg = GameLib.getInstance().get(TextureE.bg);
     bgPos = new Vector2(0, -bg.Height + Game1.height);
     song = GameLib.getInstance().playCue(SoundE.diez);
     song.Play();
 }
Esempio n. 6
0
 public Menu(Game1 game, ScreenManager screenManager, DeviceManager dev)
     : base(game, screenManager, dev)
 {
     logo = GameLib.getInstance().get(TextureE.logo);
     buttons = new Button[]
     {
         new Button(new Vector2(10, Game1.height - 270), new Vector2(400, 400),TextureE.about),
         new Button(new Vector2(Game1.width/2 - 500/2 , Game1.height - 330), new Vector2(500, 500),TextureE.start),
         new Button(new Vector2(Game1.width-390, Game1.height - 270), new Vector2(400, 400),TextureE.exit)
     };
     buttons[1].LayerDepth = 0f;
     buttons[selected].Focus = true;
     foreach (Button b in buttons)
     {
         b.addAlpha((byte)0);
     }
     sound = GameLib.getInstance().playCue(SoundE.once);
     sound.Play();
 }
Esempio n. 7
0
 public Screen(Game game, ScreenManager screenManager, DeviceManager devman)
     : base(game)
 {
     this.screenManager = screenManager;
     this.devMan = devman;
 }