summaryrefslogtreecommitdiffhomepage
path: root/lib/ruby2d/rectangle.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby2d/rectangle.rb')
-rw-r--r--lib/ruby2d/rectangle.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ruby2d/rectangle.rb b/lib/ruby2d/rectangle.rb
index 14fef3f..37ff3c7 100644
--- a/lib/ruby2d/rectangle.rb
+++ b/lib/ruby2d/rectangle.rb
@@ -5,9 +5,10 @@ module Ruby2D
attr_reader :x, :y, :width, :height
- def initialize(x=0, y=0, w=200, h=100, c='white')
+ def initialize(x=0, y=0, w=200, h=100, c='white', z=0)
@type_id = 2
@x, @y, @width, @height = x, y, w, h
+ @z = z
update_coords(x, y, w, h)
self.color = c