sprite working
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -1,20 +1,23 @@
|
||||
use asset_loading::ImageAssets;
|
||||
use bevy::prelude::*;
|
||||
use bevy::{prelude::*};
|
||||
use bevy_rapier3d::prelude::*;
|
||||
|
||||
mod asset_loading;
|
||||
mod bevy_plugin;
|
||||
mod interaction;
|
||||
mod level_instantiation;
|
||||
mod main_menu;
|
||||
mod player;
|
||||
mod util;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins((
|
||||
bevy_plugin::plugin,
|
||||
asset_loading::plugin,
|
||||
level_instantiation::map_plugin,
|
||||
main_menu::plugin,
|
||||
level_instantiation::map_plugin,
|
||||
interaction::plugin,
|
||||
RapierPhysicsPlugin::<NoUserData>::default(),
|
||||
RapierDebugRenderPlugin::default(),
|
||||
player::plugin,
|
||||
@@ -47,16 +50,13 @@ fn setup(
|
||||
MeshMaterial3d(materials.add(image.king.clone())),
|
||||
Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),
|
||||
));
|
||||
commands.spawn((
|
||||
RigidBody::Fixed,
|
||||
Collider::cylinder(0.1, 4.0)
|
||||
));
|
||||
commands.spawn((RigidBody::Fixed, Collider::cylinder(0.1, 4.0)));
|
||||
// cube
|
||||
commands.spawn((
|
||||
Mesh3d(meshes.add(Cuboid::new(1.0, 1.0, 1.0))),
|
||||
MeshMaterial3d(materials.add(Color::srgb_u8(124, 144, 255))),
|
||||
Transform::from_xyz(3.0, 0.5, 0.0),
|
||||
RigidBody::Fixed,
|
||||
RigidBody::Fixed,
|
||||
Collider::cuboid(0.5, 0.5, 0.5),
|
||||
));
|
||||
// light
|
||||
|
||||
Reference in New Issue
Block a user