Consistent naming

This commit is contained in:
Daniel Lynn 2021-07-17 13:42:11 -05:00
parent 34d1de5847
commit 170088b836
Signed by: daniel
GPG Key ID: 28496A140E180A9D

View File

@ -37,14 +37,14 @@ pub fn add_player(
asset_server: Res<AssetServer>,
mut materials: ResMut<Assets<ColorMaterial>>,
) {
let player_sprite = materials.add(asset_server.load("marshmallow.png").into());
let player_material = materials.add(asset_server.load("marshmallow.png").into());
commands
.spawn()
.insert(Player)
.insert(Name("Player 1".to_string()))
.insert_bundle(SpriteBundle {
material: player_sprite,
material: player_material,
sprite: Sprite::new(Vec2::new(64.0, 64.0)),
transform: Transform::from_translation(Vec3::new(0.0, 0.0, 1.0)),
..Default::default()