SpineTrackEntry.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /******************************************************************************
  2. * Spine Runtimes License Agreement
  3. * Last updated April 5, 2025. Replaces all prior versions.
  4. *
  5. * Copyright (c) 2013-2025, Esoteric Software LLC
  6. *
  7. * Integration of the Spine Runtimes into software or otherwise creating
  8. * derivative works of the Spine Runtimes is permitted under the terms and
  9. * conditions of Section 2 of the Spine Editor License Agreement:
  10. * http://esotericsoftware.com/spine-editor-license
  11. *
  12. * Otherwise, it is permitted to integrate the Spine Runtimes into software
  13. * or otherwise create derivative works of the Spine Runtimes (collectively,
  14. * "Products"), provided that each user of the Products must obtain their own
  15. * Spine Editor license and redistribution of the Products in any form must
  16. * include this license and copyright notice.
  17. *
  18. * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
  19. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
  22. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
  24. * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
  25. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  27. * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *****************************************************************************/
  29. #pragma once
  30. #include "SpineCommon.h"
  31. #include "SpineAnimation.h"
  32. #include "SpineConstant.h"
  33. #include <spine/AnimationState.h>
  34. #include "SpineSprite.h"
  35. class SpineTrackEntry : public SpineSpriteOwnedObject<spine::TrackEntry> {
  36. GDCLASS(SpineTrackEntry, SpineObjectWrapper);
  37. protected:
  38. static void _bind_methods();
  39. public:
  40. int get_track_index();
  41. Ref<SpineAnimation> get_animation();
  42. Ref<SpineTrackEntry> get_previous();
  43. bool get_loop();
  44. void set_loop(bool v);
  45. bool get_hold_previous();
  46. void set_hold_previous(bool v);
  47. bool get_reverse();
  48. void set_reverse(bool v);
  49. bool get_shortest_rotation();
  50. void set_shortest_rotation(bool v);
  51. float get_delay();
  52. void set_delay(float v);
  53. float get_track_time();
  54. void set_track_time(float v);
  55. float get_track_end();
  56. void set_track_end(float v);
  57. float get_animation_start();
  58. void set_animation_start(float v);
  59. float get_animation_end();
  60. void set_animation_end(float v);
  61. float get_animation_last();
  62. void set_animation_last(float v);
  63. float get_animation_time();
  64. float get_time_scale();
  65. void set_time_scale(float v);
  66. float get_alpha();
  67. void set_alpha(float v);
  68. float get_event_threshold();
  69. void set_event_threshold(float v);
  70. float get_mix_attachment_threshold();
  71. void set_mix_attachment_threshold(float v);
  72. float get_mix_draw_order_threshold();
  73. void set_mix_draw_order_threshold(float v);
  74. float get_alpha_attachment_threshold();
  75. void set_alpha_attachment_threshold(float v);
  76. Ref<SpineTrackEntry> get_next();
  77. bool is_complete();
  78. float get_mix_time();
  79. void set_mix_time(float v);
  80. float get_mix_duration();
  81. void set_mix_duration(float v);
  82. void set_mix_duration_and_delay(float v, float delay);
  83. SpineConstant::MixBlend get_mix_blend();
  84. void set_mix_blend(SpineConstant::MixBlend v);
  85. Ref<SpineTrackEntry> get_mixing_from();
  86. Ref<SpineTrackEntry> get_mixing_to();
  87. void reset_rotation_directions();
  88. float get_track_complete();
  89. bool was_applied();
  90. };