summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/ruby2d/line.rb1
-rw-r--r--lib/ruby2d/music.rb2
-rw-r--r--lib/ruby2d/quad.rb5
-rw-r--r--lib/ruby2d/sound.rb2
-rw-r--r--lib/ruby2d/triangle.rb2
-rw-r--r--lib/ruby2d/window.rb2
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