updating to 0.15.0 since it seems to have gotten borked?
This commit is contained in:
4055
Cargo.lock
generated
4055
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
10
Cargo.toml
10
Cargo.toml
@@ -5,12 +5,12 @@ authors = ["Hilmar Wiegand <me@hwgnd.de>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
amethyst = "0.13.2"
|
#amethyst = {path ="../amethyst", version = "0.15.0"}
|
||||||
|
amethyst = "0.15.0"
|
||||||
log = { version = "0.4.8", features = ["serde"] }
|
log = { version = "0.4.8", features = ["serde"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["vulkan"]
|
#default = ["vulkan"]
|
||||||
empty = ["amethyst/empty"]
|
#empty = ["amethyst/empty"]
|
||||||
metal = ["amethyst/metal"]
|
#metal = ["amethyst/metal"]
|
||||||
vulkan = ["amethyst/vulkan"]
|
vulkan = ["amethyst/vulkan"]
|
||||||
nightly = ["amethyst/nightly"]
|
|
||||||
|
|||||||
@@ -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/")?;
|
||||||
@@ -46,7 +46,7 @@ fn main() -> amethyst::Result<()> {
|
|||||||
.with_bundle(
|
.with_bundle(
|
||||||
RenderingBundle::<DefaultBackend>::new()
|
RenderingBundle::<DefaultBackend>::new()
|
||||||
.with_plugin(
|
.with_plugin(
|
||||||
RenderToWindow::from_config_path(display_config)
|
RenderToWindow::from_config_path(display_config).unwrap()
|
||||||
.with_clear([0.34, 0.36, 0.52, 1.0]),
|
.with_clear([0.34, 0.36, 0.52, 1.0]),
|
||||||
)
|
)
|
||||||
.with_plugin(RenderFlat2D::default()),
|
.with_plugin(RenderFlat2D::default()),
|
||||||
|
|||||||
@@ -371,6 +371,10 @@ impl SimpleState for ReadyState {
|
|||||||
ReadyState::init_sprites(self, world);
|
ReadyState::init_sprites(self, world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn on_resume(&mut self, data: StateData<'_, GameData<'_, '_>>) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
fn handle_event(
|
fn handle_event(
|
||||||
&mut self,
|
&mut self,
|
||||||
mut data: StateData<'_, GameData<'_, '_>>,
|
mut data: StateData<'_, GameData<'_, '_>>,
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ Pausable systems
|
|||||||
https://book.amethyst.rs/stable/controlling_system_execution/pausable_systems.html
|
https://book.amethyst.rs/stable/controlling_system_execution/pausable_systems.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This system iterates all the objects with transform (and falling object) component
|
// This system iterates all the objects with transform (and falling object) component
|
||||||
@@ -35,8 +34,6 @@ impl<'a> System<'a> for ScrollScrollables {
|
|||||||
fn run(&mut self, (mut transforms, mut scrolling, time): Self::SystemData) {
|
fn run(&mut self, (mut transforms, mut scrolling, time): Self::SystemData) {
|
||||||
for (mut transform, mut object) in (&mut transforms, &mut scrolling).join() {
|
for (mut transform, mut object) in (&mut transforms, &mut scrolling).join() {
|
||||||
|
|
||||||
|
|
||||||
// I need to tile it by it's width
|
|
||||||
transform.prepend_translation_x(object.speed * time.delta_seconds());
|
transform.prepend_translation_x(object.speed * time.delta_seconds());
|
||||||
if transform.translation().x+object.width/2.0 < 0.0 {
|
if transform.translation().x+object.width/2.0 < 0.0 {
|
||||||
transform.set_translation_x(object.width/2.0*3.0);
|
transform.set_translation_x(object.width/2.0*3.0);
|
||||||
|
|||||||
Reference in New Issue
Block a user