Changeset 27493
- Timestamp:
- 12/28/08 00:29:24 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/starframe/lib/starframe/sprite/animatable.rb
r27492 r27493 12 12 # 13 13 # class AnimatedSprite < StarFrame::Sprite 14 # animat e:rolling do |c|14 # animation :rolling do |c| 15 15 # frames 0, linear(360) do 16 16 # self.anlge = c … … 47 47 end 48 48 49 # = Sprite::Animatable::ClassMethodsモジュール50 # Sprite::Animatableモジュールをincludeすることで追加されるクラスメソッド51 49 module ClassMethods 52 50 attr_accessor :animations #:nodoc: … … 65 63 # アニメーションを定義 66 64 # 67 # S tarFrame::Sprite::Animatable::Animation::Builderクラスのインスタンスを新規に作成し、Spriteに設定する。65 # Sprite::Animatable::Animationクラスのサブクラスを作成し、スプライトに設定する。 68 66 # 69 # params 70 # name - アニメーション名。アニメーション操作に使用する。 71 # options - オプションのHash 67 # == Example 68 # class AnimatedSprite < StarFrame::Sprite 69 # animation :rolling do |c| 70 # frames 0, linear(360) do 71 # self.anlge = c 72 # end 73 # end 74 # end 75 # 76 # == Parameters 77 # +name+:: 78 # アニメーション名。 79 # アニメーション操作に使用する。 80 # +options+:: 81 # アニメーションの初期化時に渡されるパラメタ。 72 82 # :loop - ループするかどうか 73 83 # :start - 自動的に再生するかどうか 74 # &block - アニメーション定義。このブロックはSprite::Animatable::Animation::Builderインスタンスのコンテキストで実行される。 84 # <tt>&block</tt>:: 85 # アニメーション定義。 86 # このブロックはSprite::Animatable::Animationクラスのサブクラスのコンテキストで実行される。 75 87 def animation name, options = {:loop => true, :start => true}, &block 76 88 animation = Class.new(Animation)
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)