diff options
| author | realtradam <[email protected]> | 2021-06-12 03:15:59 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-06-12 03:15:59 -0400 |
| commit | 795cb85e284d6adc83d8a8770e1e2406322f4034 (patch) | |
| tree | 1fe065f7f5ecfaf9bc34638cc5a5dd7fe848eb3e /components | |
| parent | 6e9ff64fec30779eb894a617af95ce7815e3d1ca (diff) | |
| download | FelECS-795cb85e284d6adc83d8a8770e1e2406322f4034.tar.gz FelECS-795cb85e284d6adc83d8a8770e1e2406322f4034.zip | |
file cleanup
Diffstat (limited to 'components')
| -rw-r--r-- | components/00_renderable.rb | 19 | ||||
| -rw-r--r-- | components/01_sprite.rb | 57 | ||||
| -rw-r--r-- | components/02_label.rb | 32 | ||||
| -rw-r--r-- | components/03_player_control.rb | 26 | ||||
| -rw-r--r-- | components/04_map.rb | 21 | ||||
| -rw-r--r-- | components/05_interactable.rb | 16 | ||||
| -rw-r--r-- | components/06_collidable.rb | 22 | ||||
| -rw-r--r-- | components/07_battle.rb | 4 | ||||
| -rw-r--r-- | components/07_indoor.rb | 4 | ||||
| -rw-r--r-- | components/07_overworld.rb | 16 | ||||
| -rw-r--r-- | components/debug_singleton.rb | 13 |
11 files changed, 0 insertions, 230 deletions
diff --git a/components/00_renderable.rb b/components/00_renderable.rb deleted file mode 100644 index 1d34fbb..0000000 --- a/components/00_renderable.rb +++ /dev/null @@ -1,19 +0,0 @@ -FelFlame::Components.new('Renderable', z: 0) -=begin -class Components - # If an entity can be rendered on screen - class Renderable < Helper::BaseComponent - attr_accessor :z - - def initialize - @z = 0 - end - - def set(**opts) - opts.each do |key, value| - self.send "#{key}=", value - end - end - end -end -=end diff --git a/components/01_sprite.rb b/components/01_sprite.rb deleted file mode 100644 index c02a51b..0000000 --- a/components/01_sprite.rb +++ /dev/null @@ -1,57 +0,0 @@ - -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) - -#Components::Sprite.define_method('primative_marker') do -# :sprite -#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 diff --git a/components/02_label.rb b/components/02_label.rb deleted file mode 100644 index f73b12c..0000000 --- a/components/02_label.rb +++ /dev/null @@ -1,32 +0,0 @@ - -FelFlame::Components.new :Label, :x, :y, :text, :size_enum, :alignment_enum, - :a, :r, :g, :b, :font, :vertical_alignment_enum, primative_marker: :label -=begin -class Components - # A dragonruby label wrapper - class Label < Helper::BaseComponent - - attr_accessor :x, :y, :text, :size_enum, :alignment_enum, - :a, :r, :g, :b, :font, :vertical_alignment_enum - - def set(x: @x, y: @y, text: @text, size_enum: @size_enum, alignment_enum: @alignment_enum, - a: @a, r: @r, g: @g, b: @b, font: @font, vertical_alignment_enum: @vertical_alignment_enum) - {x: @x = x, - y: @y = y, - text: @text = text, - size_enum: @size_enum = size_enum, - alignment_enum: @alignment_enum = alignment_enum, - r: @r = r, - g: @g = g, - b: @b = b, - a: @a = a, - font: @font = font, - vertical_alignment_enum: @vertical_alignment_enum = vertical_alignment_enum } - end - - def primative_marker - :label - end - end -end -end diff --git a/components/03_player_control.rb b/components/03_player_control.rb deleted file mode 100644 index f48b155..0000000 --- a/components/03_player_control.rb +++ /dev/null @@ -1,26 +0,0 @@ - -FelFlame::Components.new :PlayerControl, north: 'up', south: 'down', east: 'right', - west: 'left', interact: 'space', menu: 'enter' -=begin -class Components - # Gives control(keyboard or otherwise) over an object - class PlayerControl < Helper::BaseComponent - attr_accessor :north, :south, :east, :west, :interact, :menu - - def initialize - @north = 'up' - @south = 'down' - @east = 'right' - @west = 'left' - @interact = 'space' - @menu = 'enter' - end - - def set(**opts) - opts.each do |key, value| - send "#{key}=", value - end - end - end -end -=end diff --git a/components/04_map.rb b/components/04_map.rb deleted file mode 100644 index 7700e9f..0000000 --- a/components/04_map.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Components - # dragonruby label wrapper - class Map < Helper::BaseComponent - - attr_accessor :json_name, :json, :x, :y, :tilewidth, :tileheight, :a, :r, :g, :b - - def set(json_name: @json_name, x: @x, y: @y, tilewidth: @tilewidth, - tileheight: @tileheight, a: @a, r: @r, g: @g, b: @b) - { json_name: @json_name = json_name, - json: @json = Helper.get_json_tiles(json_name), - x: @x = x, - y: @y = y, - tilewidth: @tilewidth = tilewidth, - tileheight: @tileheight = tileheight, - r: @r = r, - g: @g = g, - b: @b = b, - a: @a = a } - end - end -end diff --git a/components/05_interactable.rb b/components/05_interactable.rb deleted file mode 100644 index 636a216..0000000 --- a/components/05_interactable.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Components - # If an entity can be rendered on screen - class Interactable < Helper::BaseComponent - attr_accessor :z - - def initialize - @z = z - end - - def set(**opts) - opts.each do |key, value| - self.send "#{key}=", value - end - end - end -end diff --git a/components/06_collidable.rb b/components/06_collidable.rb deleted file mode 100644 index 76ce51e..0000000 --- a/components/06_collidable.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Components - # If an entity can be rendered on screen - class Collidable < Helper::BaseComponent - class <<self - def add(entity_id) - super(entity_id) - #add to grid? - end - end - attr_accessor :grid - - def initialize - @grid = [[]] - end - - def set(**opts) - opts.each do |key, value| - self.send "#{key}=", value - end - end - end -end diff --git a/components/07_battle.rb b/components/07_battle.rb deleted file mode 100644 index b4ef622..0000000 --- a/components/07_battle.rb +++ /dev/null @@ -1,4 +0,0 @@ -class Components - class Battle < Helper::Level - end -end diff --git a/components/07_indoor.rb b/components/07_indoor.rb deleted file mode 100644 index e409da8..0000000 --- a/components/07_indoor.rb +++ /dev/null @@ -1,4 +0,0 @@ -class Components - class Indoor < Helper::Level - end -end diff --git a/components/07_overworld.rb b/components/07_overworld.rb deleted file mode 100644 index 55ab38a..0000000 --- a/components/07_overworld.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Components - class Overworld < Helper::Level - attr_accessor :x, :y - - def initialize - @x = 0 - @y = 0 - end - - def set(**opts) - opts.each do |key, value| - self.send "#{key}=", value - end - end - end -end diff --git a/components/debug_singleton.rb b/components/debug_singleton.rb deleted file mode 100644 index f298172..0000000 --- a/components/debug_singleton.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Components - # If an entity can be rendered on screen - class DebugSingleton - class <<self - @data = false - attr_accessor :data - - def id - 0 - end - end - end -end |
