simple transform animation
This commit is contained in:
parent
badc59c239
commit
e17c712ec6
4 changed files with 35 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use crate::animation::transform::AnimatedTransform;
|
||||
use bevy::prelude::*;
|
||||
|
||||
pub mod drag;
|
||||
|
|
@ -41,7 +42,7 @@ fn hand_setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||
}
|
||||
|
||||
fn card_arrange(
|
||||
query: Query<(Entity, &mut Transform, &Sprite, &ChildOf), With<Card>>,
|
||||
query: Query<(Entity, &mut AnimatedTransform, &Sprite, &ChildOf), With<Card>>,
|
||||
hand: Single<(Entity, &Children), With<Hand>>,
|
||||
assets: Res<Assets<Image>>,
|
||||
) {
|
||||
|
|
@ -67,6 +68,7 @@ fn card_add(
|
|||
commands.spawn((
|
||||
Sprite::from_image(card_image.0.clone()),
|
||||
Transform::from_xyz(0., 0., 0.),
|
||||
AnimatedTransform::from_xyz(0., 0., 0.),
|
||||
Card,
|
||||
ChildOf(hand.entity()),
|
||||
));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue