Skip to content

Commit

Permalink
update to bevy 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
corbamico committed Aug 23, 2022
1 parent e95798f commit 23bba9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
authors = ["corbamico <corbamico@163.com>"]
edition = "2021"
name = "bevy-tetris"
version = "0.7.0"
version = "0.8.1"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy = "0.7"
bevy_utils = "0.7"
bevy = "0.8"
bevy_utils = "0.8"
lazy_static = "1.4"
rand = "0.8"

Expand Down
14 changes: 7 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//#![windows_subsystem = "windows"]
#![windows_subsystem = "windows"]
mod bricks;
mod consts;

Expand Down Expand Up @@ -48,8 +48,8 @@ fn main() {
}

fn setup_screen(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn_bundle(OrthographicCameraBundle::new_2d());
commands.spawn_bundle(UiCameraBundle::default());
commands.spawn_bundle(Camera2dBundle::default());
//commands.spawn_bundle(UiCameraBundle::default());
commands.spawn_bundle(SpriteBundle {
texture: asset_server.load("screen.png"),
..default()
Expand Down Expand Up @@ -428,19 +428,19 @@ fn sprit_bundle(width: f32, color: Color, trans: Vec2) -> SpriteBundle {
fn init_text(msg: &str, x: f32, y: f32, asset_server: &Res<AssetServer>) -> TextBundle {
// scoreboard
TextBundle {
text: Text::with_section(
text: Text::from_section(
msg,
TextStyle {
font: asset_server.load("digital7mono.ttf"),
font_size: 16.0,
color: Color::BLACK,
},
Default::default(),
}
//Default::default(),
),
style: Style {
align_self: AlignSelf::FlexEnd,
position_type: PositionType::Absolute,
position: Rect {
position: UiRect {
left: Val::Px(x),
top: Val::Px(y),
..default()
Expand Down

0 comments on commit 23bba9f

Please sign in to comment.