private void ReduceDrillAmount(BOHRERART drillType, int amount) { switch (drillType) { case BOHRERART.Chrom: storageWindow.drillChromAmount -= amount; break; case BOHRERART.Diamant: storageWindow.drillDiamondAmount -= amount; break; case BOHRERART.Eisen: storageWindow.drillEisenAmount -= amount; break; case BOHRERART.Stahl: storageWindow.drillStahlAmount -= amount; break; case BOHRERART.Standard: storageWindow.drillStandardAmount -= amount; break; case BOHRERART.Titan: storageWindow.drillTitanAmount -= amount; break; } }
void UpdateGUIDrillType() { UISlider slider = drillTypeSlider.GetComponent <UISlider>(); slider.numberOfSteps = Enum.GetNames(typeof(BOHRERART)).Length; BOHRERART drillType = (BOHRERART)(slider.value * (slider.numberOfSteps - 1)); drillTypeVar.GetComponent <UILabel>().text = drillType.ToString() + " (" + GetDrillAmount(drillType) + ")";// +"-" + slider.value.ToString(); }
public void StartDrilling() { //DrillMaster int drillingDepth = (int)((drillingDepthSlider.GetComponent <UISlider>().value *(drillingDepthMax - 1)) + 1); BOHRERART drillType = (BOHRERART)(drillTypeSlider.GetComponent <UISlider>().value *(drillTypeSlider.GetComponent <UISlider>().numberOfSteps - 1)); if (drillingDepth <= storageWindow.pipesAmount && GetDrillAmount(drillType) > 0) { storageWindow.pipesAmount -= drillingDepth; ReduceDrillAmount(drillType); building.timer = building.timerIntervallDrilling; StartBuilding(Building.BUILDINGSTATUS.Drilling); } }
private int GetDrillAmount(BOHRERART drillType) { switch (drillType) { case BOHRERART.Chrom: return(storageWindow.drillChromAmount); break; case BOHRERART.Diamant: return(storageWindow.drillDiamondAmount); break; case BOHRERART.Eisen: return(storageWindow.drillEisenAmount); break; case BOHRERART.Stahl: return(storageWindow.drillStahlAmount); break; case BOHRERART.Standard: return(storageWindow.drillStandardAmount); break; case BOHRERART.Titan: return(storageWindow.drillTitanAmount); break; } return(0); }
private void ReduceDrillAmount(BOHRERART drillType) { ReduceDrillAmount(drillType, 1); }
private void ReduceDrillAmount(BOHRERART drillType, int amount) { switch (drillType) { case BOHRERART.Chrom: storageWindow.drillChromAmount-=amount; break; case BOHRERART.Diamant: storageWindow.drillDiamondAmount -= amount; break; case BOHRERART.Eisen: storageWindow.drillEisenAmount -= amount; break; case BOHRERART.Stahl: storageWindow.drillStahlAmount -= amount; break; case BOHRERART.Standard: storageWindow.drillStandardAmount -= amount; break; case BOHRERART.Titan: storageWindow.drillTitanAmount -= amount; break; } }
private int GetDrillAmount(BOHRERART drillType) { switch (drillType) { case BOHRERART.Chrom: return storageWindow.drillChromAmount; break; case BOHRERART.Diamant: return storageWindow.drillDiamondAmount; break; case BOHRERART.Eisen: return storageWindow.drillEisenAmount; break; case BOHRERART.Stahl: return storageWindow.drillStahlAmount; break; case BOHRERART.Standard: return storageWindow.drillStandardAmount; break; case BOHRERART.Titan: return storageWindow.drillTitanAmount; break; } return 0; }