// Constructor public GamePage() { InitializeComponent(); _game = XamlGame <ColoredCubesGame> .Create("", this); // Sample code to localize the ApplicationBar //BuildLocalizedApplicationBar(); }
//------------------------------------------------------------------------------------- // Class constructors public CubeObject(ColoredCubesGame game) : 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 = new Vector3(GameHelper.RandomNext(-3.0f, 3.0f), GameHelper.RandomNext(-7.0f, 7.0f), GameHelper.RandomNext(-10.0f, 10.0f)); Angle = new Vector3(GameHelper.RandomNext(MathHelper.TwoPi), GameHelper.RandomNext(MathHelper.TwoPi), GameHelper.RandomNext(MathHelper.TwoPi)); }