edit: How to add a new ITEM in the GameManager. Sorry for failing at making a thread title.
While I know I can add an item to a room in the Level.cs, I was wondering how I'd go about creating a new item in the GameManager.cs. For instance, I would pick up one item, and it would create a new item in a different room. I tried creating the item in a different room (in the Level.cs) and then moving it with some code, and while that returns no compiler errors, it doesn't work.
The code I tried was:
With the "Test" item created like this:
if (Player.GetInventoryItem("$5 Bill") != null)
Level.Rooms[1, 3].Items.Add(Level.Rooms[0, 0].GetItem("Test"));
I assume there's a way to move the item that actually works, or just a way to create a new one. Any help is much appreciated.
room = new Room();
rooms[0, 0] = room;
room.Title = "Test Room";
room.Description = "Room Description";
item = new Item();
item.Title = "Test";
item.PickupText = "Text for picking up the item.";