|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
use bevy::image::{ImageLoaderSettings, ImageSampler};
|
|
|
|
use bevy::image::{ImageLoaderSettings, ImageSampler};
|
|
|
|
use bevy::render::view::ColorGrading;
|
|
|
|
use bevy::render::view::ColorGrading;
|
|
|
|
|
|
|
|
use bevy::window::WindowResolution;
|
|
|
|
use games::physics2d::*;
|
|
|
|
use games::physics2d::*;
|
|
|
|
use games::*;
|
|
|
|
use games::*;
|
|
|
|
use std::hash::BuildHasher;
|
|
|
|
use std::hash::BuildHasher;
|
|
|
|
@ -15,6 +16,7 @@ fn main() {
|
|
|
|
title: "flappy bird (with rewind)".into(),
|
|
|
|
title: "flappy bird (with rewind)".into(),
|
|
|
|
name: "flappy".into(),
|
|
|
|
name: "flappy".into(),
|
|
|
|
game_type: GameType::Two,
|
|
|
|
game_type: GameType::Two,
|
|
|
|
|
|
|
|
window: Some(Window { resolution: WindowResolution::new(360.0, 640.0), ..default() })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Physics2dPlugin,
|
|
|
|
Physics2dPlugin,
|
|
|
|
))
|
|
|
|
))
|
|
|
|
@ -733,7 +735,7 @@ fn init_ui(mut commands: Commands, server: Res<AssetServer>) {
|
|
|
|
(
|
|
|
|
(
|
|
|
|
Text::new("Rewind!\n(Hold R)"),
|
|
|
|
Text::new("Rewind!\n(Hold R)"),
|
|
|
|
TextColor(BLACK.into()),
|
|
|
|
TextColor(BLACK.into()),
|
|
|
|
TextFont::from_font_size(30.0),
|
|
|
|
TextFont::from_font_size(20.0),
|
|
|
|
TextLayout::new_with_justify(JustifyText::Center)
|
|
|
|
TextLayout::new_with_justify(JustifyText::Center)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -765,7 +767,7 @@ fn init_ui(mut commands: Commands, server: Res<AssetServer>) {
|
|
|
|
(
|
|
|
|
(
|
|
|
|
Text::new("Flap!\n(Spacebar)"),
|
|
|
|
Text::new("Flap!\n(Spacebar)"),
|
|
|
|
TextColor(BLACK.into()),
|
|
|
|
TextColor(BLACK.into()),
|
|
|
|
TextFont::from_font_size(30.0),
|
|
|
|
TextFont::from_font_size(20.0),
|
|
|
|
TextLayout::new_with_justify(JustifyText::Center)
|
|
|
|
TextLayout::new_with_justify(JustifyText::Center)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
(
|
|
|
|
|