Surface.cs 614 B

1234567891011121314151617181920212223242526272829
  1. using Unity.Collections;
  2. using UnityEngine;
  3. namespace PDNWrapper
  4. {
  5. internal class Surface
  6. {
  7. NativeArray<Color32> m_Color;
  8. public Surface(int w, int h)
  9. {
  10. width = w;
  11. height = h;
  12. m_Color = new NativeArray<Color32>(width * height, Allocator.Persistent);
  13. }
  14. public void Dispose()
  15. {
  16. m_Color.Dispose();
  17. }
  18. public NativeArray<Color32> color
  19. {
  20. get { return m_Color; }
  21. }
  22. public int width { get; private set; }
  23. public int height { get; private set; }
  24. }
  25. }