public GamePage(string launchArguments)
        {
            this.InitializeComponent();

            // Create the game.
            _game = XamlGame <ColoredCubesGame> .Create(launchArguments, Window.Current.CoreWindow, this);
        }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------------------
        // 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));
        }