diff options
| author | _Tradam <[email protected]> | 2022-01-03 08:26:24 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-03 08:26:24 -0500 |
| commit | a0f792d8feadf919290b8349dbc0eac143545927 (patch) | |
| tree | ee70c5357d5969caaed08446c32746e656b223e6 /deprecated/components/01_sprite.rb | |
| parent | b535a6b1bd8019dbeba17f3853b338383208c9b3 (diff) | |
| download | FelECS-4.0.0.tar.gz FelECS-4.0.0.zip | |
See Changelog
Diffstat (limited to 'deprecated/components/01_sprite.rb')
| -rw-r--r-- | deprecated/components/01_sprite.rb | 103 |
1 files changed, 51 insertions, 52 deletions
diff --git a/deprecated/components/01_sprite.rb b/deprecated/components/01_sprite.rb index c02a51b..4ae6713 100644 --- a/deprecated/components/01_sprite.rb +++ b/deprecated/components/01_sprite.rb @@ -1,57 +1,56 @@ +# frozen_string_literal: true FelFlame::Components.new('Sprite', :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, - :source_x, :source_y, :source_w, :source_h, - :tile_x, :tile_y, :tile_w, :tile_h, - :flip_horizontally, :flip_vertically, - :angle_anchor_x, :angle_anchor_y, primative_marker: :sprite) + :source_x, :source_y, :source_w, :source_h, + :tile_x, :tile_y, :tile_w, :tile_h, + :flip_horizontally, :flip_vertically, + :angle_anchor_x, :angle_anchor_y, primative_marker: :sprite) -#Components::Sprite.define_method('primative_marker') do +# Components::Sprite.define_method('primative_marker') do # :sprite -#end +# end -=begin -class Components - # If an entity can be rendered on screen - class Sprite < Helper::BaseComponent - - attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, - :source_x, :source_y, :source_w, :source_h, - :tile_x, :tile_y, :tile_w, :tile_h, - :flip_horizontally, :flip_vertically, - :angle_anchor_x, :angle_anchor_y - - def set(x: @x, y: @y, w: @w, h: @h, path: @path, angle: @angle, a: @a, r: @r, g: @g, b: @b, - source_x: @source_x, source_y: @source_y, source_w: @source_w, source_h: @source_h, - tile_x: @tile_x, tile_y: @tile_y, tile_w: @tile_w, tile_h: @tile_h, - flip_horizontally: @flip_horizontally, flip_vertically: @flip_vertically, - angle_anchor_x: @angle_anchor_x, angle_anchor_y: @angle_anchor_y) - {x: @x = x, - y: @y = y, - w: @w = w, - h: @h = h, - path: @path = path, - angle: @angle = angle, - a: @a = a, - r: @r = r, - g: @g = g, - b: @b = b, - source_x: @source_x = source_x, - source_y: @source_y = source_y, - source_w: @source_w = source_w, - source_h: @source_h = source_h, - tile_x: @tile_x = tile_x, - tile_y: @tile_y = tile_y, - tile_w: @tile_w = tile_w, - tile_h: @tile_h = tile_h, - flip_horizontally: @flip_horizontally = flip_horizontally, - flip_vertically: @flip_vertically = flip_vertically, - angle_anchor_x: @angle_anchor_x = angle_anchor_x, - angle_anchor_y: @angle_anchor_y = angle_anchor_y} - end - - def primative_marker - :sprite - end - end -end -=end +# class Components +# # If an entity can be rendered on screen +# class Sprite < Helper::BaseComponent +# +# attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, +# :source_x, :source_y, :source_w, :source_h, +# :tile_x, :tile_y, :tile_w, :tile_h, +# :flip_horizontally, :flip_vertically, +# :angle_anchor_x, :angle_anchor_y +# +# def set(x: @x, y: @y, w: @w, h: @h, path: @path, angle: @angle, a: @a, r: @r, g: @g, b: @b, +# source_x: @source_x, source_y: @source_y, source_w: @source_w, source_h: @source_h, +# tile_x: @tile_x, tile_y: @tile_y, tile_w: @tile_w, tile_h: @tile_h, +# flip_horizontally: @flip_horizontally, flip_vertically: @flip_vertically, +# angle_anchor_x: @angle_anchor_x, angle_anchor_y: @angle_anchor_y) +# {x: @x = x, +# y: @y = y, +# w: @w = w, +# h: @h = h, +# path: @path = path, +# angle: @angle = angle, +# a: @a = a, +# r: @r = r, +# g: @g = g, +# b: @b = b, +# source_x: @source_x = source_x, +# source_y: @source_y = source_y, +# source_w: @source_w = source_w, +# source_h: @source_h = source_h, +# tile_x: @tile_x = tile_x, +# tile_y: @tile_y = tile_y, +# tile_w: @tile_w = tile_w, +# tile_h: @tile_h = tile_h, +# flip_horizontally: @flip_horizontally = flip_horizontally, +# flip_vertically: @flip_vertically = flip_vertically, +# angle_anchor_x: @angle_anchor_x = angle_anchor_x, +# angle_anchor_y: @angle_anchor_y = angle_anchor_y} +# end +# +# def primative_marker +# :sprite +# end +# end +# end |
