public VirtualStick(Texture2D socket, Texture2D stick, Vector2 position)
 {
     _socketSprite = new BasicSprite(socket);
     _stickSprite = new BasicSprite(stick);
     _picked = -1;
     _center = position;
     _position = position;
     StickPosition = Vector2.Zero;
 }
Esempio n. 2
0
        public void LoadContent()
        {
            _cursorSprite = new BasicSprite(_manager.Content.Load<Texture2D>("Common/cursor"));
            #if WINDOWS_PHONE
            // virtual stick content
            _phoneStick = new VirtualStick(_manager.Content.Load<Texture2D>("Common/socket"),
                                           _manager.Content.Load<Texture2D>("Common/stick"), new Vector2(80f, 400f));

            Texture2D temp = _manager.Content.Load<Texture2D>("Common/buttons");
            _phoneA = new VirtualButton(temp, new Vector2(695f, 380f), new Rectangle(0, 0, 40, 40), new Rectangle(0, 40, 40, 40));
            _phoneB = new VirtualButton(temp, new Vector2(745f, 360f), new Rectangle(40, 0, 40, 40), new Rectangle(40, 40, 40, 40));
            #endif
            _viewport = _manager.GraphicsDevice.Viewport;
        }