#Changing position while in state
12 messages · Page 1 of 1 (latest)
At least that's the canonical way of doing it. You can also have a simple condition like you've got here and just pass a different transform to SpriteSheetBundle
(or do a separate commands.insert(Transform::from_xyz(...)); at the end)
You want to define that function on PlayerBundle. It's just a regular struct so you can add whatever interface you want to parametrize its creation
i thought about using impl PlayerBundle { pub fn new() -> Self }
but i'm not too much familiar with impl and have no idea how to use this correctly
i think I understand now but I still get the same error @swift moss
struct PlayerBundle {
#[bundle]
sprite: SpriteSheetBundle,
new: New
}```
pub struct New(f32);
sorry if im bothering you btw
I'd suggest you brushed up on Rust in general before trying to delve deeper into Bevy. You won't get far without knowing the basics first.
i thought a simple mut would work but idk maybe i do need to brush up again lol