Vertex2D.cs 975 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using UnityEngine;
  2. using System;
  3. namespace UnityEditor.U2D.Animation
  4. {
  5. [Serializable]
  6. internal class Vertex2D
  7. {
  8. public Vector2 position
  9. {
  10. get { return m_Position; }
  11. set { m_Position = value; }
  12. }
  13. public EditableBoneWeight editableBoneWeight
  14. {
  15. get { return m_EditableBoneWeight; }
  16. set { m_EditableBoneWeight = value; }
  17. }
  18. public Vertex2D(Vector2 position)
  19. {
  20. m_Position = position;
  21. m_EditableBoneWeight = EditableBoneWeightUtility.CreateFromBoneWeight(new BoneWeight());
  22. }
  23. public Vertex2D(Vector2 position, BoneWeight weights)
  24. {
  25. m_Position = position;
  26. m_EditableBoneWeight = EditableBoneWeightUtility.CreateFromBoneWeight(weights);
  27. }
  28. [SerializeField]
  29. Vector2 m_Position;
  30. [SerializeField]
  31. EditableBoneWeight m_EditableBoneWeight;
  32. }
  33. }