private void ReduceProbeAmount(SONDENART probeType, int amount) { switch (probeType) { case SONDENART.Starterkit: storageWindow.scanStarterKitAmount -= amount; break; case SONDENART.Stark: storageWindow.scanStarkAmount -= amount; break; case SONDENART.Schwach: storageWindow.scanSchwachAmount -= amount; break; case SONDENART.Mittel: storageWindow.scanMittelAmount -= amount; break; case SONDENART.Klein: storageWindow.scanKleinAmount -= amount; break; case SONDENART.Groß: storageWindow.scanGrossAmount -= amount; break; } }
void UpdateGUIProbeType() { UISlider slider = probeTypeSlider.GetComponent <UISlider>(); slider.numberOfSteps = Enum.GetNames(typeof(SONDENART)).Length; SONDENART probeType = (SONDENART)(slider.value * (slider.numberOfSteps - 1)); probeTypeVar.GetComponent <UILabel>().text = probeType.ToString() + " (" + GetProbeAmount(probeType) + ")";// +"-" + slider.value.ToString(); }
public void StartProbing() { SONDENART probeType = (SONDENART)(probeTypeSlider.GetComponent <UISlider>().value *(probeTypeSlider.GetComponent <UISlider>().numberOfSteps - 1)); drillingDepthSlider.GetComponent <UISlider>().value = (float)(((float)GetProbingDepthGoal(probeType) - 1f) / ((float)drillingDepthMax - 1f)); int drillingDepth = (int)((drillingDepthSlider.GetComponent <UISlider>().value *(drillingDepthMax - 1)) + 1); //if (drillingDepth <= storageWindow.pipesAmount && GetProbeAmount(probeType) > 0) if (GetProbeAmount(probeType) > 0) { //storageWindow.pipesAmount -= drillingDepth; ReduceProbeAmount(probeType); building.timer = building.timerIntervallProbing; // TODO building.drillingDepthGoal Setzten aufgrund der Sonde StartBuilding(Building.BUILDINGSTATUS.Probing); } }
private int GetProbingDepthGoal(SONDENART probeType) { switch (probeType) { //Max 20 Ebenen case SONDENART.Starterkit: return(4); break; case SONDENART.Schwach: return(8); break; case SONDENART.Klein: return(12); break; case SONDENART.Mittel: return(16); break; case SONDENART.Groß: return(20); break; case SONDENART.Stark: return(20); break; } return(0); }
private int GetProbingShowAmountMax(SONDENART probeType) { switch (probeType) { //Max 20 Ebenen case SONDENART.Starterkit: return(2); break; case SONDENART.Schwach: return(4); break; case SONDENART.Klein: return(6); break; case SONDENART.Mittel: return(8); break; case SONDENART.Groß: return(10); break; case SONDENART.Stark: return(15); break; } return(0); }
private int GetProbeAmount(SONDENART probeType) { switch (probeType) { case SONDENART.Starterkit: return(storageWindow.scanStarterKitAmount); break; case SONDENART.Stark: return(storageWindow.scanStarkAmount); break; case SONDENART.Schwach: return(storageWindow.scanSchwachAmount); break; case SONDENART.Mittel: return(storageWindow.scanMittelAmount); break; case SONDENART.Klein: return(storageWindow.scanKleinAmount); break; case SONDENART.Groß: return(storageWindow.scanGrossAmount); break; } return(0); }
private void ReduceProbeAmount(SONDENART probeType) { ReduceProbeAmount(probeType, 1); }
private int GetProbingShowAmountMax(SONDENART probeType) { switch (probeType) { //Max 20 Ebenen case SONDENART.Starterkit: return 2; break; case SONDENART.Schwach: return 4; break; case SONDENART.Klein: return 6; break; case SONDENART.Mittel: return 8; break; case SONDENART.Groß: return 10; break; case SONDENART.Stark: return 15; break; } return 0; }
private int GetProbingDepthGoal(SONDENART probeType) { switch (probeType) { //Max 20 Ebenen case SONDENART.Starterkit: return 4; break; case SONDENART.Schwach: return 8; break; case SONDENART.Klein: return 12; break; case SONDENART.Mittel: return 16; break; case SONDENART.Groß: return 20; break; case SONDENART.Stark: return 20; break; } return 0; }
private int GetProbeAmount(SONDENART probeType) { switch (probeType) { case SONDENART.Starterkit: return storageWindow.scanStarterKitAmount; break; case SONDENART.Stark: return storageWindow.scanStarkAmount; break; case SONDENART.Schwach: return storageWindow.scanSchwachAmount; break; case SONDENART.Mittel: return storageWindow.scanMittelAmount; break; case SONDENART.Klein: return storageWindow.scanKleinAmount; break; case SONDENART.Groß: return storageWindow.scanGrossAmount; break; } return 0; }