diff options
Diffstat (limited to 'dragon')
| -rw-r--r-- | dragon/outputs_docs.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/dragon/outputs_docs.rb b/dragon/outputs_docs.rb index db15989..a2b4fb8 100644 --- a/dragon/outputs_docs.rb +++ b/dragon/outputs_docs.rb @@ -208,25 +208,19 @@ be provided in any order. ** Rendering a solid using a Class -You can also create a class with solid/border properties and render it as a primitive. -ALL properties must be on the class. *Additionally*, a method called ~primitive_marker~ -must be defined on the class. +You can also create a class with sprite properties and render it as a primitive. Here is an example: #+begin_src - # Create type with ALL sprite properties AND primitive_marker + # Create type with ALL sprite properties class Sprite - attr_accessor :x, :y, :w, :h, :path, :angle, :angle_anchor_x, :angle_anchor_y, :tile_x, :tile_y, :tile_w, :tile_h, :source_x, :source_y, :source_w, :source_h, :flip_horizontally, :flip_vertically, :a, :r, :g, :b - - def primitive_marker - :sprite - end + attr_sprite end # Inherit from type class Circle < Sprite - # constructor + # constructor def initialize x, y, size, path self.x = x self.y = y |
