public GamePage(string launchArguments) { this.InitializeComponent(); // Create the game. _game = XamlGame <DepthBufferGame> .Create(launchArguments, Window.Current.CoreWindow, this); }
//------------------------------------------------------------------------------------- // 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)); } }