Example #1
0
    // START:
    /// <summary>
    /// Start this instance.
    /// </summary>
    public void Start()
    {
        // Get the components
        dungeonGenerator = GetComponent<DungeonGenerator> ();
        sceneryGenerator = GetComponent<SceneryGenerator> ();

        stairsGenerator = GetComponent<StairsGenerator> ();
        roomGenerator = GetComponent<RoomGenerator> ();
        perimeterGenerator = GetComponent<PerimeterGenerator> ();
        entranceGenerator = GetComponent<EntranceGenerator> ();
        corridorGenerator = GetComponent<CorridorGenerator> ();
        voidGenerator = GetComponent<VoidGenerator> ();
        pitGenerator = GetComponent<PitGenerator> ();
        chestGenerator = GetComponent<ChestGenerator> ();
        caveGenerator = GetComponent<CaveGenerator> ();

        terrainCarver = GetComponent<TerrainCarver> ();
        terrainGenerator = GetComponent<TerrainGenerator> ();
        textureGenerator = 	GetComponent<TerrainTextureGenerator> ();

        // Initialize the instances
        stairsGenerator.Start ();
        roomGenerator.Start ();
        perimeterGenerator.Start ();
        entranceGenerator.Start ();
        corridorGenerator.Start ();
        voidGenerator.Start ();
        pitGenerator.Start ();
        chestGenerator.Start ();
        caveGenerator.Start ();

        terrainCarver.Start ();
        terrainGenerator.Start ();
        textureGenerator.Start ();

        // Initialize the floor array
        allFloors = new Floor[dungeonGenerator.numFloors];
    }