MapData.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. namespace YLBattle
  5. {
  6. public class MapData
  7. {
  8. public int id = 0;
  9. public int level = 1;
  10. public string name = "";
  11. public int width = 0;
  12. public int height = 0;
  13. /// <summary>
  14. /// 场景孵化器
  15. /// </summary>
  16. public List<ZoneSpawner> spawnUnitList { get; set; }
  17. int[,] mapInfo;
  18. public MapData()
  19. {
  20. this.spawnUnitList = new List<ZoneSpawner>();
  21. this.mapInfo = new int[,] { { } };
  22. }
  23. public MapData(int mapid)
  24. {
  25. }
  26. public void MapDataCreate()
  27. {
  28. for (int i = 0; i < mapInfo.GetLength(0); i++)
  29. {
  30. for (int j = 0; j < mapInfo.GetLength(1); j++)
  31. {
  32. int id = mapInfo[i, j];
  33. if (id == 0)
  34. {
  35. continue;
  36. }
  37. }
  38. }
  39. }
  40. }
  41. }