public void GetTilePrefabsListItem(int index, out int x, out int y, out int layer, out GameObject instance)
    {
        TilemapPrefabInstance item = tilePrefabsList[index];

        x        = item.x;
        y        = item.y;
        layer    = item.layer;
        instance = item.instance;
    }
    public void SetTilePrefabsList(List <int> xs, List <int> ys, List <int> layers, List <GameObject> instances)
    {
        int n = instances.Count;

        tilePrefabsList = new List <TilemapPrefabInstance>(n);
        for (int i = 0; i < n; ++i)
        {
            TilemapPrefabInstance item = new TilemapPrefabInstance();
            item.x        = xs[i];
            item.y        = ys[i];
            item.layer    = layers[i];
            item.instance = instances[i];
            tilePrefabsList.Add(item);
        }
    }
Beispiel #3
0
	public void SetTilePrefabsList(List<int> xs, List<int> ys, List<int> layers, List<GameObject> instances) {
		int n = instances.Count;
		tilePrefabsList = new List<TilemapPrefabInstance>(n);
		for (int i = 0; i < n; ++i) {
			TilemapPrefabInstance item = new TilemapPrefabInstance();
			item.x = xs[i];
			item.y = ys[i];
			item.layer = layers[i];
			item.instance = instances[i];
			tilePrefabsList.Add(item);
		}
	}