|
|
|
@ -465,7 +465,20 @@ fn pick_up(
|
|
|
|
game::Piece::Drone => gltf.named_animations.get("DronePickup"),
|
|
|
|
game::Piece::Drone => gltf.named_animations.get("DronePickup"),
|
|
|
|
game::Piece::Pawn => gltf.named_animations.get("PawnPickup"),
|
|
|
|
game::Piece::Pawn => gltf.named_animations.get("PawnPickup"),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
player.play(animation.expect("Pickup Animation").clone());
|
|
|
|
let idle = match piece {
|
|
|
|
|
|
|
|
game::Piece::Queen => gltf.named_animations.get("QueenIdle"),
|
|
|
|
|
|
|
|
game::Piece::Drone => gltf.named_animations.get("DroneIdle"),
|
|
|
|
|
|
|
|
game::Piece::Pawn => gltf.named_animations.get("PawnIdle"),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
player.play_with_transition(
|
|
|
|
|
|
|
|
animation.expect("Pickup Animation").clone(),
|
|
|
|
|
|
|
|
Duration::from_secs_f32(0.75),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
player.play_with_transition(
|
|
|
|
|
|
|
|
idle.expect("Idle animation").clone(),
|
|
|
|
|
|
|
|
Duration::from_secs_f32(1.5),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
player.repeat();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -489,7 +502,11 @@ fn put_down(
|
|
|
|
game::Piece::Drone => gltf.named_animations.get("DronePutDown"),
|
|
|
|
game::Piece::Drone => gltf.named_animations.get("DronePutDown"),
|
|
|
|
game::Piece::Pawn => gltf.named_animations.get("PawnPutDown"),
|
|
|
|
game::Piece::Pawn => gltf.named_animations.get("PawnPutDown"),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
player.play(animation.expect("PutDown Animation").clone());
|
|
|
|
player.stop_repeating();
|
|
|
|
|
|
|
|
player.play_with_transition(
|
|
|
|
|
|
|
|
animation.expect("PutDown Animation").clone(),
|
|
|
|
|
|
|
|
Duration::from_secs_f32(0.75),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|