private void GenerateVampireNestShells(int count = 5) { for (int i = 0; i < count; i++) { GridPoint gp = WeightedGridPoints.GetRandom(true); ChunkStructureShell shell = new ChunkStructureShell(gp, ChunkStructureType.vampireNest); StructureShells.Add(shell); } }
private void GenerateBanditCampShells(int count = 8) { for (int i = 0; i < count; i++) { GridPoint gp = WeightedGridPoints.GetRandom(true); ChunkStructureShell shell = new ChunkStructureShell(gp, ChunkStructureType.banditCamp); StructureShells.Add(shell); } }
private void GenerateAncientTempleShells(int count = 6) { for (int i = 0; i < count; i++) { GridPoint gp = WeightedGridPoints.GetRandom(true); ChunkStructureShell shell = new ChunkStructureShell(gp, ChunkStructureType.ancientTemple); StructureShells.Add(shell); } }
/// <summary> /// Randomly chooses a gridpoint to place each of the required main dungeons /// </summary> private void GenerateMainDungeonShells() { ChunkStructureType[] mainGen = new ChunkStructureType[] { ChunkStructureType.kithenaCatacomb }; foreach (ChunkStructureType t in mainGen) { //Get random item GridPoint gp = WeightedGridPoints.GetRandom(true); ChunkStructureShell shell = new ChunkStructureShell(gp, t); StructureShells.Add(shell); } }
/// <summary> /// Finds the placement for the two dragon lairs /// Uses this to generate structure shell for the two lairs, and adds to the list /// </summary> private void GenerateDragonLairShells() { Vec2i evil = GameGen.TerGen.EvilDragonMountainPeak; Vec2i good = GameGen.TerGen.GoodDragonMountainPeak; GridPoint evilGP = GameGen.GridPlacement.GetNearestPoint(evil); GridPoint goodGP = GameGen.GridPlacement.GetNearestPoint(good); ChunkStructureShell evilShell = new ChunkStructureShell(evilGP, ChunkStructureType.evilDragonLair); ChunkStructureShell goodShell = new ChunkStructureShell(goodGP, ChunkStructureType.goodDragonLair); StructureShells.Add(evilShell); StructureShells.Add(goodShell); }
public void SetPoint(GridPoint p) { bool isActive = false; this.p = p; Text = GetComponentInChildren <Text>(); if (p.Shell != null) { Button = GetComponent <Button>(); isActive = true; ColorBlock b = Button.colors; Color c = Color.black; if (p.Shell is SettlementShell) { SettlementShell ss = p.Shell as SettlementShell; if (ss.Type == SettlementType.CAPITAL) { c = Color.yellow; Text.text = "CA"; } else if (ss.Type == SettlementType.CITY) { c = Color.magenta; Text.text = "CI"; } else if (ss.Type == SettlementType.TOWN) { c = Color.blue; Text.text = "TO"; } else if (ss.Type == SettlementType.VILLAGE) { c = Color.green; Text.text = "VI"; } } else if (p.Shell is TacticalLocationShell) { TacticalLocationShell ss = p.Shell as TacticalLocationShell; if (ss.Type == TacLocType.fort) { c = Color.red; Text.text = "FO"; } else if (ss.Type == TacLocType.tower) { c = Color.cyan; Text.text = "TO"; } } else if (p.Shell is ChunkStructureShell) { ChunkStructureShell css = p.Shell as ChunkStructureShell; if (css.Type == ChunkStructureType.banditCamp) { c = Color.red; Text.text = "BA"; } else if (css.Type == ChunkStructureType.vampireNest) { c = new Color(0.5f, 0, 0.5f); Text.text = "VA"; } else if (css.Type == ChunkStructureType.kithenaCatacomb) { c = new Color(0, 0.5f, 0.5f); Text.text = "KI"; } else if (css.Type == ChunkStructureType.ancientTemple) { c = new Color(0, 0.5f, 0.5f); Text.text = "AT"; } else { c = Color.red; Text.text = "DA"; } } b.normalColor = c; Button.colors = b; } this.gameObject.SetActive(isActive); }