FixedJointInspector.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. /// <summary>
  7. /// Renders an inspector for the <see cref="FixedJoint"/> component.
  8. /// </summary>
  9. [CustomInspector(typeof(FixedJoint))]
  10. public class FixedJointInspector : JointInspector
  11. {
  12. /// <inheritdoc/>
  13. protected internal override void Initialize()
  14. {
  15. FixedJoint joint = InspectedObject as FixedJoint;
  16. if (joint != null)
  17. BuildGUI(joint);
  18. }
  19. /// <inheritdoc/>
  20. protected internal override InspectableState Refresh()
  21. {
  22. FixedJoint joint = InspectedObject as FixedJoint;
  23. if (joint == null)
  24. return InspectableState.NotModified;
  25. Refresh(joint);
  26. InspectableState oldState = modifyState;
  27. if (modifyState.HasFlag(InspectableState.Modified))
  28. modifyState = InspectableState.NotModified;
  29. return oldState;
  30. }
  31. }
  32. }