fixed small gaps in scrolling

master
mitchellhansen 5 years ago
parent 020b42397c
commit baa4b9d910

@ -25,7 +25,7 @@ use std::str::FromStr;
fn main() -> amethyst::Result<()> { fn main() -> amethyst::Result<()> {
amethyst::start_logger(Default::default()); // amethyst::start_logger(Default::default());
// Gets the root directory of the application // Gets the root directory of the application
let mut app_root = PathBuf::from_str("/home/mrh/source/flappy-bird-rust/")?; let mut app_root = PathBuf::from_str("/home/mrh/source/flappy-bird-rust/")?;

@ -132,7 +132,7 @@ impl SplashState {
let mut transform = Transform::default(); let mut transform = Transform::default();
transform.set_scale(Vector3::new(3.0, 3.0, 3.0)); transform.set_scale(Vector3::new(3.0, 3.0, 3.0));
transform.set_translation_xyz(3.0*144.0/2.0, 3.0*256.0/2.0, 0.0); transform.set_translation_xyz(3.0*143.0/2.0, 3.0*256.0/2.0, 0.0);
self.persistent_sprites.push(world self.persistent_sprites.push(world
.create_entity() .create_entity()
@ -140,13 +140,13 @@ impl SplashState {
.with(TiledScroller { .with(TiledScroller {
speed: -75.0, speed: -75.0,
position: 1.0, position: 1.0,
width: 144.0 * 3.0, width: 143.0 * 3.0,
height: 256.0 * 3.0, height: 256.0 * 3.0,
}) })
.with(transform.clone()) .with(transform.clone())
.build()); .build());
transform.set_translation_xyz(3.0*144.0/2.0*3.0, 3.0*256.0/2.0, 0.0); transform.set_translation_xyz(3.0*143.0/2.0*3.0, 3.0*256.0/2.0, 0.0);
self.persistent_sprites.push(world self.persistent_sprites.push(world
.create_entity() .create_entity()
@ -154,7 +154,7 @@ impl SplashState {
.with(TiledScroller { .with(TiledScroller {
speed: -75.0, speed: -75.0,
position: 2.0, position: 2.0,
width: 144.0 * 3.0, width: 143.0 * 3.0,
height: 256.0 * 3.0, height: 256.0 * 3.0,
}) })
.with(transform.clone()) .with(transform.clone())
@ -168,7 +168,7 @@ impl SplashState {
.with(TiledScroller { .with(TiledScroller {
speed: -100.0, speed: -100.0,
position: 2.0, position: 2.0,
width: 168.0 * 3.0, width: 167.0 * 3.0,
height: 56.0 * 3.0, height: 56.0 * 3.0,
}) })
.with(transform.clone()) .with(transform.clone())
@ -182,7 +182,7 @@ impl SplashState {
.with(TiledScroller { .with(TiledScroller {
speed: -100.0, speed: -100.0,
position: 2.0, position: 2.0,
width: 168.0 * 3.0, width: 167.0 * 3.0,
height: 56.0 * 3.0, height: 56.0 * 3.0,
}) })
.with(transform.clone()) .with(transform.clone())

Loading…
Cancel
Save