dragonruby-parallax

a simple parallax made with dragon-ruby
git clone https://github.com/TanguyAndreani/dragonruby-parallax
Log | Files | Refs | README

commit 0e9760db61e8eccc7f7979313195b3694147d00a
parent 165758acedac0851ecae64ce8edace80d5342267
Author: Tanguy Andreani <tanguy.andreani@tuta.io>
Date:   Sun, 23 Feb 2020 21:44:32 +0100

fixing some style non-issues

Diffstat:
Mapp/main.rb | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/main.rb b/app/main.rb @@ -1,5 +1,4 @@ -WIDTH = 1280 -HEIGHT = 720 +WIDTH, HEIGHT = 1280, 720 def layers [ @@ -17,6 +16,6 @@ def tick args t = args.state.tick_count % (WIDTH / i) x_coord = t * i * -1 args.outputs.sprites << [x_coord, 0, WIDTH, HEIGHT, f] - args.outputs.sprites << [WIDTH - 2 + x_coord, 0, WIDTH, HEIGHT, f] + args.outputs.sprites << [x_coord + (WIDTH - 2), 0, WIDTH, HEIGHT, f] end end \ No newline at end of file