diff options
| author | Tom Black <[email protected]> | 2018-09-04 00:48:26 -0700 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2018-09-12 14:52:23 -0700 |
| commit | 8e8755972a55b75b7f38f2da503c40e12dd4a344 (patch) | |
| tree | 778f945a135a3ed95a687e7b6d93112d569149bf | |
| parent | c9b3bd7ca5400548d882ba6b91a596568a70764c (diff) | |
| download | ruby2d-8e8755972a55b75b7f38f2da503c40e12dd4a344.tar.gz ruby2d-8e8755972a55b75b7f38f2da503c40e12dd4a344.zip | |
Cleanup
Reordering and removing unused code
| -rw-r--r-- | lib/ruby2d/line.rb | 1 | ||||
| -rw-r--r-- | lib/ruby2d/music.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/quad.rb | 5 | ||||
| -rw-r--r-- | lib/ruby2d/sound.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/triangle.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/window.rb | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/lib/ruby2d/line.rb b/lib/ruby2d/line.rb index e112f19..23fb03d 100644 --- a/lib/ruby2d/line.rb +++ b/lib/ruby2d/line.rb @@ -3,6 +3,7 @@ module Ruby2D class Line include Renderable + attr_accessor :x1, :x2, :y1, :y2, :color, :width def initialize(opts = {}) diff --git a/lib/ruby2d/music.rb b/lib/ruby2d/music.rb index 57d5e29..0ace141 100644 --- a/lib/ruby2d/music.rb +++ b/lib/ruby2d/music.rb @@ -3,8 +3,8 @@ module Ruby2D class Music - attr_accessor :data, :loop attr_reader :path + attr_accessor :loop, :data def initialize(path) diff --git a/lib/ruby2d/quad.rb b/lib/ruby2d/quad.rb index f2806ee..8ffc194 100644 --- a/lib/ruby2d/quad.rb +++ b/lib/ruby2d/quad.rb @@ -3,6 +3,9 @@ module Ruby2D class Quad include Renderable + + attr_reader :color + # Coordinates in clockwise order, starting at top left: # x1,y1 == top left # x2,y2 == top right @@ -13,8 +16,6 @@ module Ruby2D :x3, :y3, :c3, :x4, :y4, :c4 - attr_reader :color - def initialize(opts = {}) @x1 = opts[:x1] || 0 @y1 = opts[:y1] || 0 diff --git a/lib/ruby2d/sound.rb b/lib/ruby2d/sound.rb index c9fce54..3ead3fa 100644 --- a/lib/ruby2d/sound.rb +++ b/lib/ruby2d/sound.rb @@ -3,8 +3,8 @@ module Ruby2D class Sound - attr_accessor :data attr_reader :path + attr_accessor :data def initialize(path) diff --git a/lib/ruby2d/triangle.rb b/lib/ruby2d/triangle.rb index 0d34b76..75615cf 100644 --- a/lib/ruby2d/triangle.rb +++ b/lib/ruby2d/triangle.rb @@ -4,10 +4,10 @@ module Ruby2D class Triangle include Renderable + attr_reader :color attr_accessor :x1, :y1, :c1, :x2, :y2, :c2, :x3, :y3, :c3 - attr_reader :color, :type_id def initialize(opts= {}) @x1 = opts[:x1] || 50 diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index 021353d..54fd649 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -148,8 +148,6 @@ module Ruby2D end def key_callback(type, key) - # puts "===", "type: #{type}", "key: #{key}" - key = key.downcase # All key events |
