Exemple #1
0
        public GamePage(string launchArguments)
        {
            this.InitializeComponent();

            // Create the game.
            _game = XamlGame <DualTextureGame> .Create(launchArguments, Window.Current.CoreWindow, this);
        }
        //-------------------------------------------------------------------------------------
        // Class constructors

        public SquareObject(DualTextureGame game, Vector3 position, Texture2D texture1, Texture2D texture2)
            : base(game)
        {
            // Have we already built the Square vertex array in a previous instance?
            if (_vertices == null)
            {
                // No, so build them now
                BuildVertices();
            }

            // Set object properties
            Position       = position;
            ObjectTexture  = texture1;
            ObjectTexture2 = texture2;
        }