public void Distroy() { myBag = null; // removes Bag }
public GameObject(int objectid) { myBag = new Bag(); // Creates new instance of Bag myBag.objectid = objectid; // adds objectid to Bag property }