bevy/examples/2d/sprite.rs

17 lines
399 B
Rust
Raw Normal View History

2020-05-04 08:22:25 +00:00
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_startup_system(setup)
2020-05-04 08:22:25 +00:00
.run();
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn_bundle(OrthographicCameraBundle::new_2d());
commands.spawn_bundle(SpriteBundle {
texture: asset_server.load("branding/icon.png"),
..default()
});
2020-05-04 08:22:25 +00:00
}