You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
1.7 KiB

using System.Collections.Generic;
using UnityEngine;
public class MapSection : MonoBehaviour
{
//public int width = 0;
public int widthIn = 0; //Width at the entrance, including external wals
public int widthOut = 0; //Width at the exit, including external walls
public int widthMax = 0; //Greatest width at any point (including external walls)
public int length = 0;
int size;
public int difficultyMin; //The lowest difficulty rating that this section can appear on
public int difficultyMax; //And the highest
public int weight = 1; //How many copies of this section should go on the list?
//Lists of spawn points
//One for each possible number of players
public List<GameObject> spawns1;
public List<GameObject> spawns2;
public List<GameObject> spawns3;
public List<GameObject> spawns4;
public List<GameObject> spawns5;
public List<GameObject> spawns6;
public List<GameObject> spawns7;
public List<GameObject> spawns8;
public List<GameObject> entrances; //Ways into this map segment
public List<GameObject> exits; //Ways out of this map segment
public List<GameObject> collectableSpawns; //Which blocks can items spawn on?
public void InitSection()
{
size = widthMax * length;
foreach (GameObject block in collectableSpawns)
{
block.GetComponent<Block>().isCollectableSpawnable = true;
}
}
public void InitSection(int num)
{
name = num + " " + name;
InitSection();
}
public int getSize()
{
return size;
}
public void destroySection()
{
Destroy(gameObject, 0.0f);
}
}