texture???

This commit is contained in:
TudbuT 2024-11-23 16:24:16 +01:00
parent d4acd22c51
commit 35621b254e
No known key found for this signature in database
GPG key ID: B3CF345217F202D3
2 changed files with 10 additions and 6 deletions

View file

@ -16,6 +16,7 @@ pub fn add_player(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<ColorMaterial>>,
asset_server: Res<AssetServer>,
) {
// TODO replace
@ -24,15 +25,15 @@ pub fn add_player(
Player {},
MaterialMesh2dBundle {
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.),
..default()
},
))
.insert((
RigidBody::Dynamic,
Collider::cuboid(0.4 * METER, 0.9 * METER),
Velocity::default(),
))
//.insert((
// RigidBody::Dynamic,
// Collider::cuboid(0.4 * METER, 0.9 * METER),
// Velocity::default(),
//))
.insert(ActiveEvents::COLLISION_EVENTS);
}

View file

@ -1,3 +1,4 @@
use bevy::{core_pipeline::smaa::SmaaSpecializedRenderPipelines, prelude::*};
use bevy::{prelude::*, scene::ScenePlugin};
use bevy_editor_pls::EditorPlugin;
use bevy_rapier2d::prelude::*;
@ -6,4 +7,6 @@ use crate::AppState;
pub(super) fn scene_plugin(app: &mut App) {
app.add_plugins(EditorPlugin::default());
app.add_plugins(ScenePlugin);
// app.add_systems(, )
}