public float DrawGeneratorParameter(float startX, float startY) { instance.UpdateGeneratorUnitList(); SpawnGenerator gen = instance.generator; gen.Init(); startX += 5; spaceX += widthS; TDE.Label(startX, startY, width, height, "Wave Interval (Min/Max):", "The minimum and maximum value of the interval (in second) between two waves"); gen.waveIntervalMin = EditorGUI.FloatField(new Rect(startX + spaceX, startY, widthS, height), gen.waveIntervalMin); gen.waveIntervalMax = EditorGUI.FloatField(new Rect(startX + spaceX + widthS, startY, widthS, height), gen.waveIntervalMax); gen.waveIntervalMin = Mathf.Max(0, gen.waveIntervalMin); gen.waveIntervalMin = Mathf.Max(gen.waveIntervalMin, 0); gen.waveIntervalMax = Mathf.Max(0, gen.waveIntervalMax); gen.waveIntervalMax = Mathf.Max(gen.waveIntervalMax, 0); TDE.Label(startX, startY += spaceY, width, height, "Use all path:", "When checked, all available path will be used (provided that there's enough subwave in the wave)"); gen.useAllPath = EditorGUI.Toggle(new Rect(startX + spaceX, startY, widthS, height), gen.useAllPath); TDE.Label(startX, startY += spaceY, width, height, "One SubWave per path:", "When checked, the total subwave count will be limited to number of path available"); gen.limitSubWaveCountToPath = EditorGUI.Toggle(new Rect(startX + spaceX, startY, widthS, height), gen.limitSubWaveCountToPath); TDE.Label(startX, startY += spaceY, width, height, "Mirror SubWave:", "When checked, all subwave will be similar except they uses different path"); gen.similarSubWave = EditorGUI.Toggle(new Rect(startX + spaceX, startY, widthS, height), gen.similarSubWave); spaceX -= widthS; float cachedY = startY += spaceY * 2.5f; float cachedX = startX; TDE.Label(startX + 12, startY - spaceY, width * 2, height, "Wave Setting:", "", TDE.headerS); DrawGenAttribute(startX, cachedY, gen.attSubWaveCount, "SubWave Count:", "", null, 1); startX += genAttBlockWidth + 10; DrawGenAttribute(startX, cachedY, gen.attTotalUnitCount, "Total Unit Count:", "", null, 1); startX += genAttBlockWidth + 10; startX += 15; TDE.Label(startX + 12, startY - spaceY, width * 2, height, "Gain On Wave Cleared:", "", TDE.headerS); DrawGenAttribute(startX, cachedY, gen.attLifeGainOnCleared, "Life Gain:"); startX += genAttBlockWidth + 10; //cachedY=startY+spaceY; cachedX=startX; for (int i = 0; i < gen.attRscGainOnCleared.Count; i++) { DrawGenAttribute(startX, cachedY, gen.attRscGainOnCleared[i], RscDB.GetName(i), "", RscDB.GetIcon(i)); startX += genAttBlockWidth + 10; } //startY+=genAttBlockHeight+spaceY; startX=cachedX; DrawGenAttribute(startX, cachedY, gen.attLifeGainOnCleared, "Perk Rsc Gain:", "", PerkDB.GetRscIcon()); startX += genAttBlockWidth + 10; DrawGenAttribute(startX, cachedY, gen.attLifeGainOnCleared, "Ability Rsc Gain:", "", AbilityDB.GetRscIcon()); startX += genAttBlockWidth + 10; startY += genAttBlockHeight + spaceY * 2; startX = cachedX; for (int i = 0; i < gen.genItemList.Count; i++) { if (gen.genItemList[i].prefab == null) { gen.genItemList.RemoveAt(i); i -= 1; continue; } startY = DrawGenItem(startX, startY, gen.genItemList[i]) + 10; } return(startY + spaceY * 2); }