Class: Yuki::Animation::Anchor

Inherits:
TimedAnimation show all
Defined in:
docs/4_Systems_005_Animation.rb

Overview

Class bringing target to an anchor position (dynamically)

Instance Attribute Summary

Attributes inherited from TimedAnimation

#begin_time, #end_time, #time_source

Attributes included from Yuki::AnimationMixin

#player, #resolver

Instance Method Summary collapse

Methods inherited from TimedAnimation

#duration, #parallel_add, #play_before

Methods included from Yuki::AnimationMixin

#begin_offset_for_next_animation, #duration

Constructor Details

#initialize(on, to, z_offset) ⇒ Anchor

Create a new Anchor

Parameters:

  • on (ShaderedSprite | Symbol) —

    object getting anchored

  • to (ShaderedSprite | Symbol) —

    object to anchor to

  • z_offset (Integer) —

    offset z while anchoring to another object



1079
1080
# File 'docs/4_Systems_005_Animation.rb', line 1079

def initialize(on, to, z_offset)
end

Instance Method Details

#done? ⇒ Boolean

Anchor animations are always done

Returns:

  • (Boolean)


1087
1088
# File 'docs/4_Systems_005_Animation.rb', line 1087

def done?
end

#start(begin_offset = 0) ⇒ self

Start the anchor animation

Parameters:

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

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

Returns:

  • (self)


1084
1085
# File 'docs/4_Systems_005_Animation.rb', line 1084

def start(begin_offset = 0)
end

#update

Update the anchor animation



1090
1091
# File 'docs/4_Systems_005_Animation.rb', line 1090

def update
end