In the following example is there any way the method SetLevel can determine the value <NumberOfElementCalling> without me having to pass it as a parameter?
e.g. towerLevels[2].SetLevel(5, 11);
public class TowerLevel {
private int towerBrigands;
public void SetLevel(int minBrig, int varBrig) {
switch (<NumberOfElementCalling>
{
case 1: towerBrigands = RandInt(16) + 17; break;
case 2: towerBrigands = RandInt(32) + 17; break;
case 3: towerBrigands = RandInt(48) + 17; break;
case 4: towerBrigands = 16; break;
}
}
}
Thanks in advance
Paul.