private void Start() { // We use x and z here, and x and y in Maze.cs (just a reminder) maze = new CombinedMaze(mazeWidth, mazeHeight, Mood.NumberOfMoodsX, Mood.NumberOfMoodsY, seed); var matrix = maze.GetNumericalMatrix(); var width = matrix.GetLength(0); var height = matrix.GetLength(1); MoodProfile.SetMazeSize(mazeWidth, mazeHeight); for (var x = 0; x < width; x++) { for (var z = 0; z < height; z++) { var profile = MoodProfile.Get(x, z); if (matrix[x, z] == 1) { CreateWall(x, z, profile.WallMaterial); } else { CreateFloor(x, z, profile.FloorMaterial); } } } }
private static void InitProfiles() { var defaultWall = LoadWall("Brick"); var defaultFloor = LoadFloor("Floor"); _profiles = new MoodProfile[3, 3]; // Dramatic _profiles[0, 0] = new MoodProfile( LoadWall("Forest"), LoadFloor("Grass 2") ); // Concrete _profiles[0, 1] = new MoodProfile( LoadWall("Hedge"), LoadFloor("Sand") ); // Harmonic _profiles[0, 2] = new MoodProfile( LoadWall("Water"), LoadFloor("Sand") ); // Scary _profiles[1, 0] = new MoodProfile( LoadWall("Tree"), LoadFloor("Blood") ); // Neutral _profiles[1, 1] = new MoodProfile( defaultWall, defaultFloor ); // Merry _profiles[1, 2] = new MoodProfile( LoadWall("ButterfliesAndBubbles"), LoadFloor("Grass") ); // Glitchy _profiles[2, 0] = new MoodProfile( LoadWall("Faces"), LoadFloor("Brown") ); // Abstract _profiles[2, 1] = new MoodProfile( LoadWall("Abstrakt"), LoadFloor("Checkers") ); // Trippy var trippyMaterial = new TrippyMaterial(); _profiles[2, 2] = new MoodProfile( trippyMaterial.Material, LoadFloor("Stream") ); _profilesInitialized = true; }