summaryrefslogtreecommitdiffhomepage
path: root/test/sprite.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/sprite.rb')
-rw-r--r--test/sprite.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/test/sprite.rb b/test/sprite.rb
index e0042b7..321897c 100644
--- a/test/sprite.rb
+++ b/test/sprite.rb
@@ -1,15 +1,9 @@
require 'ruby2d'
-if RUBY_ENGINE == 'opal'
- media = "../test/media"
-else
- media = "media"
-end
-
set title: "Ruby 2D — Sprite", width: 400, height: 300
coin1 = Sprite.new(
- "#{media}/coin.png",
+ 'media/coin.png',
clip_width: 84,
time: 300,
loop: true
@@ -18,7 +12,7 @@ coin1 = Sprite.new(
coin1.play
coin2 = Sprite.new(
- "#{media}/coin.png",
+ 'media/coin.png',
y: 90,
width: 42,
height: 42,
@@ -30,14 +24,14 @@ coin2 = Sprite.new(
coin2.play
boom = Sprite.new(
- "#{media}/boom.png",
+ 'media/boom.png',
x: 109,
clip_width: 127,
time: 75
)
hero = Sprite.new(
- "#{media}/hero.png",
+ 'media/hero.png',
x: 261,
width: 78,
height: 99,
@@ -51,7 +45,7 @@ hero = Sprite.new(
)
atlas = Sprite.new(
- "#{media}/texture_atlas.png",
+ 'media/texture_atlas.png',
x: 50, y: 90,
animations: {
count: [