BoardConf.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using PublicTools.Unity;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. namespace ShadowStudio.Tool
  6. {
  7. /// <summary>
  8. /// 黑板的配置
  9. /// </summary>
  10. public class BoardConf
  11. {
  12. /// <summary>
  13. /// 黑板的key
  14. /// </summary>
  15. private string prikey = "MainBord";
  16. /// <summary>
  17. /// 物体的边界大小,尺寸
  18. /// 默认是1920*1080的屏幕
  19. /// </summary>
  20. private XVector2 boundary = new XVector2(new Vector2(3000, 1400));
  21. /// <summary>
  22. /// 网格大小,尺寸,默认10*10的大小
  23. /// </summary>
  24. private XVector2 cellSize = new XVector2(Vector2.one * 10);
  25. /// <summary>
  26. /// 吸附的距离,点到平面的距离
  27. /// 如果是边界,判断是否相交
  28. /// </summary>
  29. private float adsorption = 10;
  30. /// <summary>
  31. /// 展示的距离,吸附在表面的距离,避免和黑板重叠,设置位置差
  32. /// </summary>
  33. private float showDis = -1;
  34. /// <summary>
  35. /// 是否自动对齐网格
  36. /// </summary>
  37. private bool isAutoAlign = true;
  38. /// <summary>
  39. /// 是否自动排列
  40. /// 按照网格的顺序自动排列
  41. /// </summary>
  42. private bool isAutoArrange = false;
  43. /// <summary>
  44. /// 误差相差的角度
  45. /// </summary>
  46. private float angle = 15;
  47. /// 按下移出距离
  48. /// </summary>
  49. private float pressPonit = -0.1f;
  50. /// <summary>
  51. /// 黑板的key
  52. /// </summary>
  53. public string Prikey { get => prikey; set => prikey = value; }
  54. /// <summary>
  55. /// 物体的边界大小,尺寸
  56. /// 默认是1920*1080的屏幕
  57. /// </summary>
  58. public XVector2 Boundary { get => boundary; set => boundary = value; }
  59. /// <summary>
  60. /// 网格大小,尺寸,默认10*10的大小
  61. /// </summary>
  62. public XVector2 CellSize { get => cellSize; set => cellSize = value; }
  63. /// <summary>
  64. /// 吸附的距离,点到平面的距离
  65. /// 如果是边界,判断是否相交
  66. /// </summary>
  67. public float Adsorption { get => adsorption; set => adsorption = value; }
  68. /// <summary>
  69. /// 是否自动对齐网格
  70. /// </summary>
  71. public bool IsAutoAlign { get => isAutoAlign; set => isAutoAlign = value; }
  72. /// <summary>
  73. /// 是否自动排列
  74. /// 按照网格的顺序自动排列
  75. /// </summary>
  76. public bool IsAutoArrange { get => isAutoArrange; set => isAutoArrange = value; }
  77. /// <summary>
  78. /// 平面相差角度
  79. /// </summary>
  80. public float Angle { get => angle; set => angle = value; }
  81. public float ShowDis { get => showDis; set => showDis = value; }
  82. public float PressPonit { get => pressPonit; set => pressPonit = value; }
  83. }
  84. }