Module: Miyako::Animation
- Included in:
- ChoiceStruct, Choices, Diagram::Processor, Diagram::Renderer, Drawer, FixedMap, FixedMap::FixedMapLayer, Font, InitiativeYuki, LayoutSpace, ListPairStruct, Map, Map::MapLayer, MapEvent, Movie, Parts, Plane, Sprite, SpriteAnimation, SpriteArray, SpriteList, TextBox, Viewport, Yuki
- Defined in:
- lib/Miyako/API/modules.rb
Overview
基本アニメーションモジュール
アニメーションの基本メソッドで構成されるテンプレートモジュール
Constant Summary collapse
- @@anim_hash =
{}
Class Method Summary collapse
- .[](key) ⇒ Object
- .[]=(key, value) ⇒ Object
- .anim_hash ⇒ Object
- .reset ⇒ Object
- .start ⇒ Object
- .stop ⇒ Object
- .update ⇒ Object
- .update_animation ⇒ Object
Instance Method Summary collapse
-
#reset ⇒ Object
アニメーションパターンを先頭に戻すメソッドのテンプレート 返却値:: 自分自身を返す.
-
#start ⇒ Object
アニメーションを開始するメソッドのテンプレート 返却値:: 自分自身を返す.
-
#stop ⇒ Object
アニメーションを停止するメソッドのテンプレート 返却値:: 自分自身を返す.
-
#update_animation ⇒ Object
アニメーションを更新するメソッドのテンプレート 返却値:: falseを返す(アニメーションパターンが更新されたときにtrueを返す).
Class Method Details
.[](key) ⇒ Object
228 229 230 |
# File 'lib/Miyako/API/modules.rb', line 228 def Animation.[](key) @@anim_hash[key] end |
.[]=(key, value) ⇒ Object
232 233 234 |
# File 'lib/Miyako/API/modules.rb', line 232 def Animation.[]=(key, value) @@anim_hash[key] = value end |
.anim_hash ⇒ Object
236 237 238 |
# File 'lib/Miyako/API/modules.rb', line 236 def Animation.anim_hash @@anim_hash end |
.reset ⇒ Object
248 249 250 |
# File 'lib/Miyako/API/modules.rb', line 248 def Animation.reset @@anim_hash.each_value{|v| v.reset if v } end |
.start ⇒ Object
240 241 242 |
# File 'lib/Miyako/API/modules.rb', line 240 def Animation.start @@anim_hash.each_value{|v| v.start if v } end |
.stop ⇒ Object
244 245 246 |
# File 'lib/Miyako/API/modules.rb', line 244 def Animation.stop @@anim_hash.each_value{|v| v.stop if v } end |
Instance Method Details
#reset ⇒ Object
アニメーションパターンを先頭に戻すメソッドのテンプレート
- 返却値
-
自分自身を返す
274 275 276 |
# File 'lib/Miyako/API/modules.rb', line 274 def reset return self end |
#start ⇒ Object
アニメーションを開始するメソッドのテンプレート
- 返却値
-
自分自身を返す
262 263 264 |
# File 'lib/Miyako/API/modules.rb', line 262 def start return self end |
#stop ⇒ Object
アニメーションを停止するメソッドのテンプレート
- 返却値
-
自分自身を返す
268 269 270 |
# File 'lib/Miyako/API/modules.rb', line 268 def stop return self end |
#update_animation ⇒ Object
アニメーションを更新するメソッドのテンプレート
- 返却値
-
falseを返す(アニメーションパターンが更新されたときにtrueを返す)
280 281 282 |
# File 'lib/Miyako/API/modules.rb', line 280 def update_animation return false end |