Skip to content

Commit 23bba9f

Browse files
committed
update to bevy 0.8.1
1 parent e95798f commit 23bba9f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
authors = ["corbamico <[email protected]>"]
33
edition = "2021"
44
name = "bevy-tetris"
5-
version = "0.7.0"
5+
version = "0.8.1"
66

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

99
[dependencies]
10-
bevy = "0.7"
11-
bevy_utils = "0.7"
10+
bevy = "0.8"
11+
bevy_utils = "0.8"
1212
lazy_static = "1.4"
1313
rand = "0.8"
1414

src/main.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//#![windows_subsystem = "windows"]
1+
#![windows_subsystem = "windows"]
22
mod bricks;
33
mod consts;
44

@@ -48,8 +48,8 @@ fn main() {
4848
}
4949

5050
fn setup_screen(mut commands: Commands, asset_server: Res<AssetServer>) {
51-
commands.spawn_bundle(OrthographicCameraBundle::new_2d());
52-
commands.spawn_bundle(UiCameraBundle::default());
51+
commands.spawn_bundle(Camera2dBundle::default());
52+
//commands.spawn_bundle(UiCameraBundle::default());
5353
commands.spawn_bundle(SpriteBundle {
5454
texture: asset_server.load("screen.png"),
5555
..default()
@@ -428,19 +428,19 @@ fn sprit_bundle(width: f32, color: Color, trans: Vec2) -> SpriteBundle {
428428
fn init_text(msg: &str, x: f32, y: f32, asset_server: &Res<AssetServer>) -> TextBundle {
429429
// scoreboard
430430
TextBundle {
431-
text: Text::with_section(
431+
text: Text::from_section(
432432
msg,
433433
TextStyle {
434434
font: asset_server.load("digital7mono.ttf"),
435435
font_size: 16.0,
436436
color: Color::BLACK,
437-
},
438-
Default::default(),
437+
}
438+
//Default::default(),
439439
),
440440
style: Style {
441441
align_self: AlignSelf::FlexEnd,
442442
position_type: PositionType::Absolute,
443-
position: Rect {
443+
position: UiRect {
444444
left: Val::Px(x),
445445
top: Val::Px(y),
446446
..default()

0 commit comments

Comments
 (0)