// Constructor
        public GamePage()
        {
            InitializeComponent();

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

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Exemple #2
0
        //-------------------------------------------------------------------------------------
        // Class constructors

        public CubeObject(DepthBufferGame game, Vector3 position, Vector3 scale, bool rotate)
            : base(game)
        {
            // Have we already built the cube vertex array in a previous instance?
            if (_vertices == null)
            {
                // No, so build them now
                BuildVertices();
            }

            // Set other object properties
            Position = position;
            Scale    = scale;
            if (rotate)
            {
                Rotate = true;
                Angle  = new Vector3(GameHelper.RandomNext(MathHelper.TwoPi), GameHelper.RandomNext(MathHelper.TwoPi), GameHelper.RandomNext(MathHelper.TwoPi));
            }
        }