Feat : various fixes, sounds and multiplayer additions
This commit is contained in:
@@ -55,13 +55,24 @@ function endAnimation() {
|
||||
animationCallbacks.value.forEach((p) => p());
|
||||
}
|
||||
|
||||
containerEvents.set(props.container._id, {
|
||||
populateContainer,
|
||||
shuffleContainer,
|
||||
getCardsPosition,
|
||||
startAnimation,
|
||||
endAnimation,
|
||||
});
|
||||
watch(
|
||||
props.container,
|
||||
(newValue, oldValue) => {
|
||||
if (oldValue) {
|
||||
containerEvents.delete(oldValue._id);
|
||||
}
|
||||
if (newValue) {
|
||||
containerEvents.set(newValue._id, {
|
||||
populateContainer,
|
||||
shuffleContainer,
|
||||
getCardsPosition,
|
||||
startAnimation,
|
||||
endAnimation,
|
||||
});
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
async function onEnter(_el: any, done: () => void) {
|
||||
animationCallbacks.value.push(done);
|
||||
|
||||
Reference in New Issue
Block a user