Advertisement
logancberrypie

biome

Aug 11th, 2021
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Biome
  6. {
  7. public static int TILE_SIZE = 2;
  8.  
  9.  
  10. public BiomeType bType;
  11. public TextureInfomation texInfo;
  12.  
  13.  
  14.  
  15. public float[,] biomeHeightMap;
  16.  
  17. public Biome(BiomeType b)
  18. {
  19. bType = b;
  20.  
  21. //need to import the image
  22. var temp = Resources.Load(bType.ToString()) as Texture2D;
  23. texInfo = new TextureInfomation();
  24. texInfo.tex = temp;
  25. texInfo.terrainLayerID = -1;
  26. Debug.Log(temp.name);
  27. }
  28.  
  29.  
  30. }
  31.  
  32.  
  33. public struct TextureInfomation
  34. {
  35. public Texture2D tex;
  36. public int terrainLayerID;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement