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

implement progress

parent 4d356d8d
...@@ -130,6 +130,7 @@ const CandyCrushGameLevel04 = ({navigation}) => { ...@@ -130,6 +130,7 @@ const CandyCrushGameLevel04 = ({navigation}) => {
}, },
}, },
]); ]);
backgroundMusic.current.setVolume(0.0);
resetGame(); resetGame();
} }
} else { } else {
......
...@@ -82,6 +82,7 @@ const GameLevel1 = ({navigation}) => { ...@@ -82,6 +82,7 @@ const GameLevel1 = ({navigation}) => {
}, },
], ],
); );
backgroundMusic.current.setVolume(0.0);
} else if (timeLeft === 0 && score < 50) { } else if (timeLeft === 0 && score < 50) {
Alert.alert( Alert.alert(
'Game Over', 'Game Over',
...@@ -296,7 +297,7 @@ const styles = StyleSheet.create({ ...@@ -296,7 +297,7 @@ const styles = StyleSheet.create({
board: { board: {
width: 350, width: 350,
height: 350, height: 350,
backgroundColor: '#E56E94', backgroundColor: '#F33A6A',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
overflow: 'hidden', overflow: 'hidden',
......
...@@ -81,6 +81,7 @@ const CandyCrushGameLevel02 = ({navigation}) => { ...@@ -81,6 +81,7 @@ const CandyCrushGameLevel02 = ({navigation}) => {
}, },
], ],
); );
backgroundMusic.current.setVolume(0.0);
} else if (timeLeft === 0 && score < 55) { } else if (timeLeft === 0 && score < 55) {
Alert.alert( Alert.alert(
'Game Over', 'Game Over',
......
...@@ -81,6 +81,7 @@ const CandyCrushGameLevel03 = ({navigation}) => { ...@@ -81,6 +81,7 @@ const CandyCrushGameLevel03 = ({navigation}) => {
}, },
], ],
); );
backgroundMusic.current.setVolume(0.0);
} else if (timeLeft === 0 && score < 75) { } else if (timeLeft === 0 && score < 75) {
Alert.alert( Alert.alert(
'Game Over', 'Game Over',
......
...@@ -75,6 +75,7 @@ const GameLevel5 = ({navigation}) => { ...@@ -75,6 +75,7 @@ const GameLevel5 = ({navigation}) => {
}, },
]); ]);
setPoints(0); setPoints(0);
backgroundMusic.current.setVolume(0.0);
} }
}, [points]); }, [points]);
......
...@@ -72,6 +72,7 @@ const GameLevel6 = () => { ...@@ -72,6 +72,7 @@ const GameLevel6 = () => {
if (points >= 200) { if (points >= 200) {
Alert.alert('Congratulations 🥳🥳', 'You have won the game!'); Alert.alert('Congratulations 🥳🥳', 'You have won the game!');
setPoints(0); setPoints(0);
backgroundMusic.current.setVolume(0.0);
} }
}, [points]); }, [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