WIP scaling without breaking font rendering, too
This commit is contained in:
parent
4c7e259537
commit
f9bedc374e
|
@ -3,7 +3,7 @@ use bevy::render::camera::Camera;
|
|||
|
||||
pub fn startup(mut commands: Commands) {
|
||||
let mut bundle = (Camera2dBundle::default(), IsDefaultUiCamera);
|
||||
bundle.0.projection.scale = 0.5;
|
||||
// bundle.0.projection.scale = 1;
|
||||
commands.spawn(bundle);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ pub fn startup(mut commands: Commands, assets: Res<AssetLoader>) {
|
|||
"Text Example\nPress ENTER to play",
|
||||
TextStyle {
|
||||
font: assets.fonts.iosevkalytemin.clone(),
|
||||
font_size: 30.0,
|
||||
font_size: 100.0,
|
||||
..default()
|
||||
},
|
||||
)
|
||||
|
|
|
@ -29,36 +29,35 @@ pub fn startup(
|
|||
let listener = SpatialListener::new(1.);
|
||||
|
||||
commands
|
||||
.spawn((
|
||||
Player,
|
||||
YSortable,
|
||||
Watched,
|
||||
SpriteSheetBundle {
|
||||
texture,
|
||||
atlas: assets.images.player.clone().into(),
|
||||
sprite: Sprite::default(),
|
||||
..default()
|
||||
},
|
||||
Mover {
|
||||
velocity: Velocity(Vec2::ZERO),
|
||||
heading: Heading(Vec2::ZERO),
|
||||
speed: Speed(PLAYER_SPEED),
|
||||
},
|
||||
))
|
||||
.spawn((Player, YSortable, Watched))
|
||||
.with_children(|player| {
|
||||
player.spawn((
|
||||
SpriteSheetBundle {
|
||||
texture,
|
||||
transform: Transform::from_scale(Vec3::new(2., 2., 1.)),
|
||||
atlas: assets.images.player.clone().into(),
|
||||
sprite: Sprite::default(),
|
||||
..default()
|
||||
},
|
||||
Mover {
|
||||
velocity: Velocity(Vec2::ZERO),
|
||||
heading: Heading(Vec2::ZERO),
|
||||
speed: Speed(PLAYER_SPEED),
|
||||
},
|
||||
));
|
||||
player.spawn((SpatialBundle::default(), listener.clone()));
|
||||
player.spawn(TextBundle {
|
||||
player.spawn(Text2dBundle {
|
||||
text: Text::from_section(
|
||||
"You",
|
||||
TextStyle {
|
||||
font_size: 100.0,
|
||||
font_size: 11.0,
|
||||
font: assets.fonts.iosevkalytemin.clone(),
|
||||
color: Color::WHITE,
|
||||
..Default::default()
|
||||
..default()
|
||||
},
|
||||
),
|
||||
transform: Transform::from_translation(Vec3::new(30.0, -30.0, -1000.0)),
|
||||
..Default::default()
|
||||
transform: Transform::from_translation(Vec3::new(30.0, -30.0, 0.)),
|
||||
..default()
|
||||
});
|
||||
|
||||
let mesh = Mesh2dHandle(meshes.add(Capsule2d::new(3.0, 25.0)));
|
||||
|
|
Loading…
Reference in a new issue