Esempio n. 1
0
        // Constructor
        public GamePage()
        {
            InitializeComponent();

            _game = XamlGame <AccelerometerGame> .Create("", this);

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
        //-------------------------------------------------------------------------------------
        // Class constructors

        internal BallObject(AccelerometerGame game, Vector2 position, Texture2D texture)
            : base(game, position, texture)
        {
            // Store a strongly typed reference to the game
            _game = game;

            // Set the origin to the middle of the sprite
            Origin = new Vector2(SpriteTexture.Width, SpriteTexture.Height) / 2;
        }