I recently started writing a game in XNA, and I have run into a problem. I have a class called baseObject which I am using for all the objects in my game. But the problem is, if I create two instances of it, whatever changes I make to the one also affect the other. Here's some of my code:
Now, temp2's position will be the same as temp1's.Code:baseObject temp1 = new baseObject(); baseObject temp2 = new baseObject(); ... temp1.objectPosition = new Vector(0.0f, 5.0f, 0.0f);
Why?