Class: Yuki::Animation::Disposable
- Defined in:
- docs/4_Systems_005_Animation.rb
Overview
Disposable animations are animations that behave like normal animation but have few extra features:
- Being able to refine the resolver with additional sprites created for the animation
- Being able to dispose all the additional sprites when done
- Being able to dispose itself when some conditions are met
Instance Attribute Summary collapse
- #animation ⇒ AnimationMixin readonly
- #dispose_if_done ⇒ Boolean
- #resolver ⇒ Hash | nil readonly
- #resolver_input ⇒ Hash | nil readonly
Instance Method Summary collapse
-
#dispose
Dispose the animation and all associated resources.
- #disposed? ⇒ Boolean
- #done? ⇒ Boolean
-
#initialize(animation, resolver: nil, resolver_refinement: nil, dispose_if_done: true, dispose_criteria: nil) ⇒ Disposable
constructor
Create a new disposable animation.
-
#start(begin_offset = 0) ⇒ self
Start the animation (initialize it).
-
#update
Update the animation.
Constructor Details
#initialize(animation, resolver: nil, resolver_refinement: nil, dispose_if_done: true, dispose_criteria: nil) ⇒ Disposable
Create a new disposable animation
1239 1240 |
# File 'docs/4_Systems_005_Animation.rb', line 1239 def initialize(animation, resolver: nil, resolver_refinement: nil, dispose_if_done: true, dispose_criteria: nil) end |
Instance Attribute Details
#animation ⇒ AnimationMixin (readonly)
1218 1219 1220 |
# File 'docs/4_Systems_005_Animation.rb', line 1218 def animation @animation end |
#dispose_if_done ⇒ Boolean
1220 1221 1222 |
# File 'docs/4_Systems_005_Animation.rb', line 1220 def dispose_if_done @dispose_if_done end |
#resolver ⇒ Hash | nil (readonly)
1214 1215 1216 |
# File 'docs/4_Systems_005_Animation.rb', line 1214 def resolver @resolver end |
#resolver_input ⇒ Hash | nil (readonly)
1216 1217 1218 |
# File 'docs/4_Systems_005_Animation.rb', line 1216 def resolver_input @resolver_input end |
Instance Method Details
#dispose
Dispose the animation and all associated resources
1248 1249 |
# File 'docs/4_Systems_005_Animation.rb', line 1248 def dispose end |
#disposed? ⇒ Boolean
1242 1243 |
# File 'docs/4_Systems_005_Animation.rb', line 1242 def disposed? end |
#done? ⇒ Boolean
1245 1246 |
# File 'docs/4_Systems_005_Animation.rb', line 1245 def done? end |
#start(begin_offset = 0) ⇒ self
Start the animation (initialize it)
1256 1257 |
# File 'docs/4_Systems_005_Animation.rb', line 1256 def start(begin_offset = 0) end |
#update
Update the animation
1251 1252 |
# File 'docs/4_Systems_005_Animation.rb', line 1251 def update end |