/// <summary> /// Clears the dungeon data model /// </summary> public override void ResetModel() { DoorManager = new DoorManager(); State = DungeonModelBuildState.Initial; Config = null; Cells = new List <Cell>(); ToolData = new DungeonToolData(); }
/// <summary> /// Gets the configuration of the dungeon /// </summary> /// <returns></returns> public DungeonConfig GetDungeonConfig() { if (dungeonConfig == null) { dungeonConfig = GetSiblingComponent <DungeonConfig>(); } return(dungeonConfig); }
/// <summary> /// Builds the dungeon layout /// </summary> /// <param name="config">The builder configuration</param> /// <param name="model">The dungeon model that the builder will populate</param> public virtual void BuildDungeon(DungeonConfig config, DungeonModel model) { this.config = config; this.model = model; nrandom = new PMRandom(config.Seed); random = new PMRandom(config.Seed); isLayoutBuilt = true; }
/// <summary> /// Builds the dungeon layout /// </summary> /// <param name="config">The builder configuration</param> /// <param name="model">The dungeon model that the builder will populate</param> public virtual void BuildDungeon(DungeonConfig config, DungeonModel model) { this.config = config; this.model = model; nrandom = new PMRandom(config.Seed); random = new PMRandom(config.Seed); GridToMeshScale = config.GridCellSize; isLayoutBuilt = true; }
protected void Initialize() { config = GetComponent <DungeonConfig>(); dungeon = GetComponent <Dungeon>(); if (itemParent != null && !itemParent.isStatic) { // The parent should be static for performance reasons, or all child generated items would be considered as non-static (? TODO: confirm) Debug.LogWarning("Dungeon Scene Items parent is not marked static (" + itemParent.name + "). Please mark as static to improve performance"); } }
/// <summary> /// Builds the dungeon layout /// </summary> /// <param name="config">The builder configuration</param> /// <param name="model">The dungeon model that the builder will populate</param> public virtual void BuildDungeon(DungeonConfig config, DungeonModel model) { this.config = config; this.model = model; nrandom = new PMRandom(config.Seed); random = new PMRandom(config.Seed); propSockets = CreateMarkerListObject(config); isLayoutBuilt = true; }
void Initialize() { if (config == null) { config = GetComponent <DungeonConfig> (); } if (sceneProvider == null) { sceneProvider = GetComponent <PooledDungeonSceneProvider> (); } if (dungeonBuilder == null) { dungeonBuilder = GetComponent <DungeonBuilder> (); } if (dungeonModel == null) { dungeonModel = GetComponent <DungeonModel> (); } }
protected virtual LevelMarkerList CreateMarkerListObject(DungeonConfig config) { return(new SpatialPartionedLevelMarkerList(8)); }
protected void Initialize() { config = GetComponent <DungeonConfig>(); dungeon = GetComponent <Dungeon>(); }