Search Results

Search found 1 results on 1 pages for 'user1149068'.

Page 1/1 | 1 

  • How does one refer to the game1 class's variables in XNA

    - by user1149068
    I try to refer to an array in the Game1 class by creating an object of the Game1 class with its definition Game1 gameObject; , its declaration gameObject = new Game1(); in the constructor, and its usage gameObject.tileArray[xInt, yInt].treed = true;. The game1 class itself remains unchanged in its class code other than some methods and variables. When I try to use this code in the TreeRegion class it gives me "Object reference not set to an instance of an object," leading me to believe that the game1 class is null somehow. How might one change the class or object in order to refer to game1's variables? Mind you I am self-taught and still rather new to C#. The class that refers to game1: http://pastebin.com/0chEcKfq Game1 itself http://pastebin.com/zLDVzCca

    Read the article

1