Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchantey committed Oct 19, 2024
1 parent 6cc18f1 commit 11abf51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions crates/beet_examples/src/robot_arm/barbarian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ pub fn spawn_barbarian(mut commands: Commands) {
))
.with_children(|parent| {
let agent = parent.parent_entity();


let _emote_bubble = spawn_emote_bubble(
&mut parent.spawn(Transform::from_xyz(0.5, 2.5, 0.5)),
);

parent
.spawn((
Name::new("Animation Behavior"),
Expand Down Expand Up @@ -98,10 +104,6 @@ pub fn spawn_barbarian(mut commands: Commands) {
.with_transition_duration(transition_duration),
));
});

spawn_emote_bubble(
&mut parent.spawn(Transform::from_xyz(0.5, 2.5, 0.5)),
);
});
}

Expand Down
7 changes: 4 additions & 3 deletions crates/beet_examples/src/robot_arm/emote_bubble.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use crate::prelude::*;
use beetmash::prelude::*;
use bevy::prelude::*;
use crate::prelude::*;

#[derive(Default, Component, Reflect)]
#[reflect(Default, Component)]
pub struct EmoteBubble;



pub fn spawn_emote_bubble(commands:&mut EntityCommands) {
pub fn spawn_emote_bubble(commands: &mut EntityCommands) -> Entity {
commands
.insert((Name::new("Emote Bubble"), BundlePlaceholder::Pbr {
mesh: MeshPlaceholder::Plane3d(Plane3d::new(
Expand All @@ -35,5 +35,6 @@ pub fn spawn_emote_bubble(commands:&mut EntityCommands) {
unlit: true,
},
},
));
))
.id()
}

0 comments on commit 11abf51

Please sign in to comment.