bevy-playground/src/main.rs

45 lines
1.1 KiB
Rust
Raw Normal View History

2023-12-25 13:49:52 -06:00
use bevy::audio::{AudioPlugin, SpatialScale};
2023-12-19 11:17:49 -06:00
use bevy::prelude::*;
mod assets;
mod camera;
2023-12-20 13:36:34 -06:00
mod movement;
mod player;
mod statue;
2023-12-19 11:17:49 -06:00
fn main() {
let mut app = App::new();
2023-12-24 21:30:18 -06:00
2023-12-22 21:43:16 -06:00
app.add_plugins(
DefaultPlugins
.set(WindowPlugin {
primary_window: Some(Window {
title: "Kodo Tag".into(),
resolution: (800., 600.).into(),
..Default::default()
}),
..Default::default()
})
2023-12-24 21:30:18 -06:00
.set(AudioPlugin {
2023-12-25 13:49:52 -06:00
spatial_scale: SpatialScale::new_2d(1.),
global_volume: GlobalVolume::new(1.),
2023-12-24 21:30:18 -06:00
..default()
})
2023-12-22 21:43:16 -06:00
.set(ImagePlugin::default_nearest()),
)
2023-12-20 22:08:40 -06:00
.add_plugins((
statue::Statue,
2023-12-20 22:08:40 -06:00
camera::Camera,
2023-12-20 22:40:13 -06:00
assets::AssetPlugin,
2023-12-20 22:08:40 -06:00
player::Player,
movement::Movement,
))
.insert_resource(ClearColor(Color::rgb(0.3, 0., 0.5)))
.insert_resource(AmbientLight {
color: Color::rgb(1., 1., 1.),
brightness: 1.,
});
2023-12-19 11:17:49 -06:00
app.run()
}