summaryrefslogtreecommitdiffhomepage
path: root/run.rb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-04-24 01:30:18 -0400
committerrealtradam <[email protected]>2021-04-24 01:30:18 -0400
commit645974e42ce72c95a3ba9f9de2278e71d89ffa6c (patch)
treef8c7d1a7d564a2469b794bda2e704aacda5fa6ad /run.rb
parent45767fb1ae8d0da1daa14d716a26674f3d5d24b9 (diff)
downloadruby2d-camera-old-645974e42ce72c95a3ba9f9de2278e71d89ffa6c.tar.gz
ruby2d-camera-old-645974e42ce72c95a3ba9f9de2278e71d89ffa6c.zip
.
Diffstat (limited to 'run.rb')
-rw-r--r--run.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/run.rb b/run.rb
index d1afb77..09e3072 100644
--- a/run.rb
+++ b/run.rb
@@ -20,6 +20,15 @@ end
Window.set(icon: './assets/player.png')
# There is 2 ways you can add objects to be known and controlled by the camera, both do the same thing
+
+@square = Square.new(
+ x: 100, y: 100,
+ size: 125,
+ color: 'random'
+)
+
+Camera << @square
+
25.times do
tempx = (0..1920).to_a.sample
tempy = (0..1080).to_a.sample