Exemplo n.º 1
0
        public KeyboardControl()
        {
            XmlPath = "Content/Load/Keyboard.xml";

            if (!File.Exists(XmlPath))
            {
                KeyboardControl standard = XmlIntermediatemanager.Deserialize <KeyboardControl>("Content/Load/KeyboardStandard.xml");
                XmlIntermediatemanager.Serialize <KeyboardControl>(XmlPath, standard);
            }
        }
Exemplo 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);
        }
Exemplo n.º 3
0
 public override void LoadContent()
 {
     base.LoadContent();
     keyboard = keyboard.LoadContent();
     gamePad  = gamePad.LoadContent();
 }