summaryrefslogtreecommitdiffhomepage
path: root/house.rb
diff options
context:
space:
mode:
Diffstat (limited to 'house.rb')
-rw-r--r--house.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/house.rb b/house.rb
index 1da0d58..b4b495f 100644
--- a/house.rb
+++ b/house.rb
@@ -6,64 +6,64 @@ class House
@objects = []
@x = x
@y = y
- @objects.push Image.new('assets/blobshadow.png',
+ @objects.push Camera::Image.new('assets/blobshadow.png',
width: 320,
height: 250,
x: x - 10,
y: y + 130,
z: 0)
- @objects.push Image.new('assets/bricktexture.png',
+ @objects.push Camera::Image.new('assets/bricktexture.png',
x: x,
y: y,
width: 300,
height: 300)
- @objects.push Square.new(x: 125 + x,
+ @objects.push Camera::Square.new(x: 125 + x,
y: 230 + y,
size: 50,
color: 'black')
- @objects.push Circle.new(x: 125 + x,
+ @objects.push Camera::Circle.new(x: 125 + x,
y: 205 + y,
radius: 25,
color: 'black')
- @objects.push Triangle.new(x1: -5 + x,
+ @objects.push Camera::Triangle.new(x1: -5 + x,
y1: 16 + y,
x2: 310 + x,
y2: 14 + y,
x3: 150 + x,
y3: -75 + y,
color: 'red')
- @objects.push Square.new(x: 160 + x,
+ @objects.push Camera::Square.new(x: 160 + x,
y: 20 + y,
size: 100,
color: 'brown',
z: 1)
- @objects.push Square.new(x: 170 + x,
+ @objects.push Camera::Square.new(x: 170 + x,
y: 25 + y,
size: 80,
opacity: 0.5,
color: 'blue',
z: 2)
- @objects.push Rectangle.new(x: 160 + x,
+ @objects.push Camera::Rectangle.new(x: 160 + x,
y: 105 + y,
width: 100,
height: 20,
color: 'brown',
z: 3)
- @objects.push Line.new(x1: 210 + x,
+ @objects.push Camera::Line.new(x1: 210 + x,
y1: 105 + y,
x2: 210 + x,
y2: 25 + y,
width: 4,
color: 'brown',
z: 3)
- @objects.push Line.new(x1: 250 + x,
+ @objects.push Camera::Line.new(x1: 250 + x,
y1: 65 + y,
x2: 170 + x,
y2: 65 + y,
width: 4,
color: 'brown',
z: 3)
- @objects.push Sprite.new('./assets/sprites/alienpls-56.png',
+ @objects.push Camera::Sprite.new('./assets/sprites/alienpls-56.png',
x: 175 + x,
y: 65 + y,
width: 56,
@@ -73,14 +73,14 @@ class House
time: 35,
z: 1)
@objects.last.play
- @objects.each do |item|
- Camera << item
- end
+ #@objects.each do |item|
+ # Camera << item
+ #end
end
def remove
@objects.each do |item|
- Camera.remove item
+ #Camera.remove item
item.remove
end
end
@@ -89,7 +89,7 @@ class House
x = @x + 80
y = @y + 160
if character.x >= x && character.x <= (x + (character.width * 2)) && character.y > y && character.y <= (y + (character.height * 2))
- Text.new('Press Space To Enter House',
+ Camera::Text.new('Press Space To Enter House',
x: x + 70,
y: y + 30,
color: 'white',