Пример #1
0
    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;
    }
Пример #2
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);
        }
    }
Пример #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);
		}
	}