Changeset 27493

Show
Ignore:
Timestamp:
12/28/08 00:29:24 (4 years ago)
Author:
isaisstillalive
Message:
  • rdocを修正
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/starframe/lib/starframe/sprite/animatable.rb

    r27492 r27493  
    1212    #  
    1313    #   class AnimatedSprite < StarFrame::Sprite 
    14     #     animate :rolling do |c| 
     14    #     animation :rolling do |c| 
    1515    #       frames 0, linear(360) do 
    1616    #         self.anlge = c 
     
    4747      end 
    4848       
    49       # = Sprite::Animatable::ClassMethodsモジュール 
    50       # Sprite::Animatableモジュールをincludeすることで追加されるクラスメソッド 
    5149      module ClassMethods 
    5250        attr_accessor :animations #:nodoc: 
     
    6563        # アニメーションを定義 
    6664        #  
    67         # StarFrame::Sprite::Animatable::Animation::Builderクラスのインスタンスを新規に作成し、Spriteに設定する。 
     65        # Sprite::Animatable::Animationクラスのサブクラスを作成し、スプライトに設定する。 
    6866        #  
    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        #   アニメーションの初期化時に渡されるパラメタ。 
    7282        #     :loop  - ループするかどうか 
    7383        #     :start - 自動的に再生するかどうか 
    74         #   &block - アニメーション定義。このブロックはSprite::Animatable::Animation::Builderインスタンスのコンテキストで実行される。 
     84        # <tt>&block</tt>:: 
     85        #   アニメーション定義。 
     86        #   このブロックはSprite::Animatable::Animationクラスのサブクラスのコンテキストで実行される。 
    7587        def animation name, options = {:loop => true, :start => true}, &block 
    7688          animation = Class.new(Animation)