public void GetRandomPart(TierProbability _tierChances, out PartBody _part) { int _tierProb = _tierChances.GetRandomTier(); switch (_tierProb) { case 1: _part = vehicleBaseParts[0]; return; case 2: _part = vehicleBaseParts[1]; return; case 3: _part = vehicleBaseParts[2]; return; } _part = null; }
public void GetRandomPart(TierProbability _tierChances, out PartUpgrade _part) { int _tierProb = _tierChances.GetRandomTier(); switch (_tierProb) { case 1: _part = partsUpgradeList[0]; return; case 2: _part = partsUpgradeList[0]; return; case 3: _part = partsUpgradeList[0]; return; } _part = null; }