title: C# Class objects resetting?
body: <p>I think I may know what my problem is, but I'm not sure how to solve it. I've tried to google it, but no look...</p>
  
  <p>Let's say I have 3 classes; menu, shop and player. When you buy something from the shop, it gets added to your inventory in the player class and then you go back to the main menu. You then choose to view your inventory.</p>
  
  <p>I have all this working, but when I choose to view my inventory at the main menu, it has nothing inside of it. I know it works, cause I've printed my inventory out in the shop after I've bought an item.</p>
  
  <p>I think it's because I'm making a new object in the menu and shop classes? </p>
  
  <p>Menu.cs</p>
  
  <pre><code>Shop shop = new Shop();
  Player player = new Player();
  </code></pre>
  
  <p>Shop.cs</p>
  
  <pre><code>Menu menu = new Menu();
  Player player = new Player();
  </code></pre>
  
  <p>I think the problem is when I'm sending the user back to the menu after they've bought an item, it creates a new Player object which sets all their variables back to default?</p>
  
  <p>I don't know too much about classes and objects, as I learn by doing. But is there a way to make it so it doesn't reset itself once you go back to the menu?</p>