public void ParseXML(XMLNode x) { this.Name = x.SelectString("name"); this.Hardness = x.SelectInt("hardness"); this.Burns = x.SelectBool("burns"); this.Oxidizes = x.SelectBool("oxidizes"); XMLNode densityNode = x.Select("density"); density[0] = densityNode.SelectFloat("min"); density[2] = densityNode.SelectFloat("max"); density[1] = (density[0] + density[2]) / 2; this.Density = density[Probability.getRandomInt(3)]; this.MeltingPoint = x.SelectInt("meltingpoint"); }