Module: Yuki::AnimationMixin

Included in:
Yuki::Animation::Player, Yuki::Animation::TimedAnimation
Defined in:
docs/4_Systems_005_Animation.rb

Overview

Module describing the interface for all sort of animations. This is an abstraction, methods from this modules are meant to be exposed through solargraph (is_a?).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#player ⇒ Animation::Player?

Get the animation player

Returns:



51
52
53
# File 'docs/4_Systems_005_Animation.rb', line 51

def player
  @player
end

#resolver ⇒ Hash

Get the animation resolver

Returns:

  • (Hash)


48
49
50
# File 'docs/4_Systems_005_Animation.rb', line 48

def resolver
  @resolver
end

Instance Method Details

#begin_offset_for_next_animation ⇒ Float

Get the begin offset for the next animation to start

Returns:

  • (Float)


71
72
# File 'docs/4_Systems_005_Animation.rb', line 71

def begin_offset_for_next_animation
end

#done? ⇒ Boolean

Check if the animation is done

Returns:

  • (Boolean)


59
60
# File 'docs/4_Systems_005_Animation.rb', line 59

def done?
end

#duration ⇒ Float

Get the animation duration in seconds

Returns:

  • (Float)


67
68
# File 'docs/4_Systems_005_Animation.rb', line 67

def duration
end

#start(_begin_offset = 0) ⇒ self

Start the animation

Parameters:

  • _begin_offset (Float) (defaults to: 0) —

    offset for starting the animation (added to animation's clock)

Returns:

  • (self)


55
56
# File 'docs/4_Systems_005_Animation.rb', line 55

def start(_begin_offset = 0)
end

#update ⇒ self

Update the animation

Returns:

  • (self)


63
64
# File 'docs/4_Systems_005_Animation.rb', line 63

def update
end