Commit 66b6c0b7 authored by Malsha Jayakody's avatar Malsha Jayakody

implement progress

parent 4d356d8d
......@@ -130,6 +130,7 @@ const CandyCrushGameLevel04 = ({navigation}) => {
},
},
]);
backgroundMusic.current.setVolume(0.0);
resetGame();
}
} else {
......
......@@ -82,6 +82,7 @@ const GameLevel1 = ({navigation}) => {
},
],
);
backgroundMusic.current.setVolume(0.0);
} else if (timeLeft === 0 && score < 50) {
Alert.alert(
'Game Over',
......@@ -296,7 +297,7 @@ const styles = StyleSheet.create({
board: {
width: 350,
height: 350,
backgroundColor: '#E56E94',
backgroundColor: '#F33A6A',
justifyContent: 'center',
alignItems: 'center',
overflow: 'hidden',
......
......@@ -81,6 +81,7 @@ const CandyCrushGameLevel02 = ({navigation}) => {
},
],
);
backgroundMusic.current.setVolume(0.0);
} else if (timeLeft === 0 && score < 55) {
Alert.alert(
'Game Over',
......
......@@ -81,6 +81,7 @@ const CandyCrushGameLevel03 = ({navigation}) => {
},
],
);
backgroundMusic.current.setVolume(0.0);
} else if (timeLeft === 0 && score < 75) {
Alert.alert(
'Game Over',
......
......@@ -75,6 +75,7 @@ const GameLevel5 = ({navigation}) => {
},
]);
setPoints(0);
backgroundMusic.current.setVolume(0.0);
}
}, [points]);
......
......@@ -72,6 +72,7 @@ const GameLevel6 = () => {
if (points >= 200) {
Alert.alert('Congratulations 🥳🥳', 'You have won the game!');
setPoints(0);
backgroundMusic.current.setVolume(0.0);
}
}, [points]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment