Class: Yuki::Animation::Dim2AnimationDiscreet
- Inherits:
-
TimedAnimation
- Object
- TimedAnimation
- Yuki::Animation::Dim2AnimationDiscreet
- Defined in:
- scripts/01100 Yuki/00100 Animation/00100 Animation.rb
Overview
Class that perform a 2D animation (from point a to point b)
Instance Attribute Summary
Attributes inherited from TimedAnimation
#begin_time, #end_time, #parallel_animations, #root, #sub_animation, #time_source
Instance Method Summary collapse
-
#initialize(time_to_process, on, property, a_x, a_y, b_x, b_y, distortion: :UNICITY_DISTORTION, time_source: :GENERIC_TIME_SOURCE) ⇒ Dim2AnimationDiscreet
constructor
Create a new ScalarAnimation convert it to another number (between 0 & 1) in order to distord time.
-
#start(begin_offset = 0)
Start the animation (initialize it).
Methods inherited from TimedAnimation
#done?, #in_parallel_of, #parallel_add, #play_before, #resolver=, #update
Constructor Details
#initialize(time_to_process, on, property, a_x, a_y, b_x, b_y, distortion: :UNICITY_DISTORTION, time_source: :GENERIC_TIME_SOURCE) ⇒ Dim2AnimationDiscreet
Create a new ScalarAnimation convert it to another number (between 0 & 1) in order to distord time
520 521 522 523 524 525 526 527 528 529 |
# File 'scripts/01100 Yuki/00100 Animation/00100 Animation.rb', line 520 def initialize(time_to_process, on, property, a_x, a_y, b_x, b_y, distortion: :UNICITY_DISTORTION, time_source: :GENERIC_TIME_SOURCE) super(time_to_process, distortion, time_source) @origin_x_param = a_x @origin_y_param = a_y @end_x_param = b_x @end_y_param = b_y @on_param = on @property = property end |
Instance Method Details
#start(begin_offset = 0)
Start the animation (initialize it)
533 534 535 536 537 538 539 540 |
# File 'scripts/01100 Yuki/00100 Animation/00100 Animation.rb', line 533 def start(begin_offset = 0) super @on = resolve(@on_param) @origin_x = resolve(@origin_x_param) @origin_y = resolve(@origin_y_param) @delta_x = resolve(@end_x_param) - @origin_x @delta_y = resolve(@end_y_param) - @origin_y end |