Ejemplo n.º 1
0
        public GamePadControl(PlayerIndex i)
        {
            Index   = i;
            XmlPath = "Content/Load/GamePad" + (i.ToString()) + ".xml";

            if (!File.Exists(XmlPath))
            {
                GamePadControl standard = XmlIntermediatemanager.Deserialize <GamePadControl>("Content/Load/GamePadStandard.xml");
                standard.Index = Index;
                XmlIntermediatemanager.Serialize <GamePadControl>(XmlPath, standard);
            }
        }
Ejemplo n.º 2
0
        public Controls()
        {
            defaultView     = GameStateManager.Instance.GraphicsDevice.Viewport;
            leftView        = defaultView;
            rightView       = defaultView;
            leftView.Width  = leftView.Width / 2;
            rightView.Width = rightView.Width / 2;
            rightView.X     = leftView.Width;

            keyboard = new KeyboardControl();
            gamePad  = new GamePadControl();

            font = GameStateManager.Instance.Content.Load <SpriteFont>("SpriteFonts/Standard");

            back          = new Image();
            back.Path     = "Images/buttonTexture";
            back.Text     = "Back";
            back.isActive = true;
            back.LoadContent();
            back.ActivateEffect("FadeEffect");
            back.Position = new Vector2((defaultView.Width - back.SourceRect.Width) / 2, defaultView.Height - back.SourceRect.Height - 40);
        }
Ejemplo n.º 3
0
 public override void LoadContent()
 {
     base.LoadContent();
     keyboard = keyboard.LoadContent();
     gamePad  = gamePad.LoadContent();
 }