texture???
This commit is contained in:
parent
d4acd22c51
commit
35621b254e
2 changed files with 10 additions and 6 deletions
|
@ -16,6 +16,7 @@ pub fn add_player(
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
mut meshes: ResMut<Assets<Mesh>>,
|
mut meshes: ResMut<Assets<Mesh>>,
|
||||||
mut materials: ResMut<Assets<ColorMaterial>>,
|
mut materials: ResMut<Assets<ColorMaterial>>,
|
||||||
|
asset_server: Res<AssetServer>,
|
||||||
) {
|
) {
|
||||||
// TODO replace
|
// TODO replace
|
||||||
|
|
||||||
|
@ -24,15 +25,15 @@ pub fn add_player(
|
||||||
Player {},
|
Player {},
|
||||||
MaterialMesh2dBundle {
|
MaterialMesh2dBundle {
|
||||||
mesh: meshes.add(Circle::new(20.)).into(),
|
mesh: meshes.add(Circle::new(20.)).into(),
|
||||||
material: materials.add(Color::linear_rgb(0., 1., 0.)),
|
material: materials.add(asset_server.load("test.png")),
|
||||||
transform: Transform::from_xyz(100., 100., 0.),
|
transform: Transform::from_xyz(100., 100., 0.),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
.insert((
|
//.insert((
|
||||||
RigidBody::Dynamic,
|
// RigidBody::Dynamic,
|
||||||
Collider::cuboid(0.4 * METER, 0.9 * METER),
|
// Collider::cuboid(0.4 * METER, 0.9 * METER),
|
||||||
Velocity::default(),
|
// Velocity::default(),
|
||||||
))
|
//))
|
||||||
.insert(ActiveEvents::COLLISION_EVENTS);
|
.insert(ActiveEvents::COLLISION_EVENTS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
use bevy::{core_pipeline::smaa::SmaaSpecializedRenderPipelines, prelude::*};
|
||||||
use bevy::{prelude::*, scene::ScenePlugin};
|
use bevy::{prelude::*, scene::ScenePlugin};
|
||||||
use bevy_editor_pls::EditorPlugin;
|
use bevy_editor_pls::EditorPlugin;
|
||||||
use bevy_rapier2d::prelude::*;
|
use bevy_rapier2d::prelude::*;
|
||||||
|
@ -6,4 +7,6 @@ use crate::AppState;
|
||||||
|
|
||||||
pub(super) fn scene_plugin(app: &mut App) {
|
pub(super) fn scene_plugin(app: &mut App) {
|
||||||
app.add_plugins(EditorPlugin::default());
|
app.add_plugins(EditorPlugin::default());
|
||||||
|
app.add_plugins(ScenePlugin);
|
||||||
|
// app.add_systems(, )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue