Commit 4d116eb7 authored by Neranga K.T.'s avatar Neranga K.T.

advance screen

parent 0340c9e8
...@@ -48,6 +48,18 @@ import MediumGameScreenFive from '../screen/memory/medium/MediumGameScreenFive'; ...@@ -48,6 +48,18 @@ import MediumGameScreenFive from '../screen/memory/medium/MediumGameScreenFive';
import MediumGameScreenFiveAll from '../screen/memory/medium/MediumGameScreenFiveAll'; import MediumGameScreenFiveAll from '../screen/memory/medium/MediumGameScreenFiveAll';
import MediumGameScreenSix from '../screen/memory/medium/MediumGameScreenSix'; import MediumGameScreenSix from '../screen/memory/medium/MediumGameScreenSix';
import MediumGameScreenSixAll from '../screen/memory/medium/MediumGameScreenSixAll'; import MediumGameScreenSixAll from '../screen/memory/medium/MediumGameScreenSixAll';
import AdvanceGameScreenOne from '../screen/memory/advance/AdvanceGameScreenOne';
import AdvanceGameScreenOneAll from '../screen/memory/advance/AdvanceGameScreenOneAll';
import AdvanceGameScreenTwo from '../screen/memory/advance/AdvanceGameScreenTwo';
import AdvanceGameScreenTwoAll from '../screen/memory/advance/AdvanceGameScreenTwoAll';
import AdvanceGameScreenThree from '../screen/memory/advance/AdvanceGameScreenThree';
import AdvanceGameScreenThreeAll from '../screen/memory/advance/AdvanceGameScreenThreeAll';
import AdvanceGameScreenFour from '../screen/memory/advance/AdvanceGameScreenFour';
import AdvanceGameScreenFourAll from '../screen/memory/advance/AdvanceGameScreenFourAll';
import AdvanceGameScreenFive from '../screen/memory/advance/AdvanceGameScreenFive';
import AdvanceGameScreenFiveAll from '../screen/memory/advance/AdvanceGameScreenFiveAll';
import AdvanceGameScreenSix from '../screen/memory/advance/AdvanceGameScreenSix';
import AdvanceGameScreenSixAll from '../screen/memory/advance/AdvanceGameScreenSixAll';
import GameOverScreen from '../screen/memory/GameOverScreen'; import GameOverScreen from '../screen/memory/GameOverScreen';
import MemoryResult from '../screen/memory/MemoryResult'; import MemoryResult from '../screen/memory/MemoryResult';
import GameLevel from '../screen/memory/GameLevel'; import GameLevel from '../screen/memory/GameLevel';
...@@ -284,7 +296,7 @@ const AppRouter = () => { ...@@ -284,7 +296,7 @@ const AppRouter = () => {
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: Colors.primary},
}} }}
/> />
<Stack.Screen <Stack.Screen
options={{headerShown: false}} options={{headerShown: false}}
name="MediumGameScreenOne" name="MediumGameScreenOne"
component={MediumGameScreenOne} component={MediumGameScreenOne}
...@@ -344,6 +356,66 @@ const AppRouter = () => { ...@@ -344,6 +356,66 @@ const AppRouter = () => {
name="MediumGameScreenSixAll" name="MediumGameScreenSixAll"
component={MediumGameScreenSixAll} component={MediumGameScreenSixAll}
/> />
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenOne"
component={AdvanceGameScreenOne}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenOneAll"
component={AdvanceGameScreenOneAll}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenTwo"
component={AdvanceGameScreenTwo}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenTwoAll"
component={AdvanceGameScreenTwoAll}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenThree"
component={AdvanceGameScreenThree}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenThreeAll"
component={AdvanceGameScreenThreeAll}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenFour"
component={AdvanceGameScreenFour}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenFourAll"
component={AdvanceGameScreenFourAll}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenFive"
component={AdvanceGameScreenFive}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenFiveAll"
component={AdvanceGameScreenFiveAll}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenSix"
component={AdvanceGameScreenSix}
/>
<Stack.Screen
options={{headerShown: false}}
name="AdvanceGameScreenSixAll"
component={AdvanceGameScreenSixAll}
/>
<Stack.Screen <Stack.Screen
options={{headerShown: false}} options={{headerShown: false}}
name="PrimaryType" name="PrimaryType"
......
import React from 'react'; import React from 'react';
import {View,Text, StyleSheet, Button} from 'react-native'; import {View,Text, StyleSheet, Button} from 'react-native';
const AdvanceLevelStart = () => { const AdvanceLevelStart = ({navigation}) => {
return( return(
<View style={styles.screen}> <View style={styles.screen}>
<Text>Advance Level Start</Text> <Text>Advance Level Start</Text>
<Button title='Start' onPress={()=>{}} /> <Button title='Start' onPress={()=>{navigation.navigate('AdvanceGameScreenOne')}} />
</View> </View>
); );
} }
......
...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native'; ...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import CountDown from 'react-native-countdown-component'; import CountDown from 'react-native-countdown-component';
import Countdown from '../../../constants/Countdown'; import Countdown from '../../../constants/Countdown';
const GameScreenFive = ({navigation}) => { const AdvanceGameScreenFive = ({navigation}) => {
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
...@@ -16,9 +16,9 @@ const GameScreenFive = ({navigation}) => { ...@@ -16,9 +16,9 @@ const GameScreenFive = ({navigation}) => {
</View> </View>
<CountDown <CountDown
size={40} size={40}
until={Countdown.elementry} until={Countdown.advance}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenFiveAll')} onFinish={() => navigation.navigate('AdvanceGameScreenFiveAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
digitTxtStyle={{color: '#1CC625'}} digitTxtStyle={{color: '#1CC625'}}
timeLabelStyle={{color: 'red', fontWeight: 'bold'}} timeLabelStyle={{color: 'red', fontWeight: 'bold'}}
...@@ -66,4 +66,4 @@ const GameScreenFive = ({navigation}) => { ...@@ -66,4 +66,4 @@ const GameScreenFive = ({navigation}) => {
} }
}); });
export default GameScreenFive; export default AdvanceGameScreenFive;
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ import { SCREEN5 } from '../../../memory/data/elementry-level'; ...@@ -6,7 +6,7 @@ import { SCREEN5 } from '../../../memory/data/elementry-level';
let gameData = SCREEN5.sort((item)=>Math.random(item.id)-0.5); let gameData = SCREEN5.sort((item)=>Math.random(item.id)-0.5);
const GameScreenFiveAll = ({navigation}) => { const AdvanceGameScreenFiveAll = ({navigation}) => {
const shuffle = () => { const shuffle = () => {
gameData = SCREEN5.sort((item)=>Math.random(item.id)-0.5); gameData = SCREEN5.sort((item)=>Math.random(item.id)-0.5);
...@@ -38,7 +38,7 @@ const GameScreenFiveAll = ({navigation}) => { ...@@ -38,7 +38,7 @@ const GameScreenFiveAll = ({navigation}) => {
const renderImageItem = (itemData) => { const renderImageItem = (itemData) => {
return( return(
<TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('GameScreenSix')}}> <TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('AdvanceGameScreenSix')}}>
<Image style={styles.image} source={itemData.item.source}/> <Image style={styles.image} source={itemData.item.source}/>
</TouchableOpacity> </TouchableOpacity>
) )
...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({ ...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
}); });
export default GameScreenFiveAll; export default AdvanceGameScreenFiveAll;
\ No newline at end of file \ No newline at end of file
...@@ -3,13 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native'; ...@@ -3,13 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import CountDown from 'react-native-countdown-component'; import CountDown from 'react-native-countdown-component';
import Countdown from '../../../constants/Countdown'; import Countdown from '../../../constants/Countdown';
const GameScreenFour = ({navigation}) => { const AdvanceGameScreenFour = ({navigation}) => {
useEffect(()=>{
setTimeout( () => {
navigation.navigate('GameScreenFourAll');
}, 5000 );
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
...@@ -23,9 +17,9 @@ const GameScreenFour = ({navigation}) => { ...@@ -23,9 +17,9 @@ const GameScreenFour = ({navigation}) => {
<Text style={styles.imageText}>Car - කාරය</Text> <Text style={styles.imageText}>Car - කාරය</Text>
<CountDown <CountDown
size={40} size={40}
until={Countdown.elementry} until={Countdown.advance}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenFourAll')} onFinish={() => navigation.navigate('AdvanceGameScreenFourAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
digitTxtStyle={{color: '#1CC625'}} digitTxtStyle={{color: '#1CC625'}}
timeLabelStyle={{color: 'red', fontWeight: 'bold'}} timeLabelStyle={{color: 'red', fontWeight: 'bold'}}
...@@ -72,4 +66,4 @@ const GameScreenFour = ({navigation}) => { ...@@ -72,4 +66,4 @@ const GameScreenFour = ({navigation}) => {
} }
}); });
export default GameScreenFour; export default AdvanceGameScreenFour;
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ import { SCREEN4 } from '../../../memory/data/elementry-level'; ...@@ -6,7 +6,7 @@ import { SCREEN4 } from '../../../memory/data/elementry-level';
let gameData = SCREEN4.sort((item)=>Math.random(item.id)-0.5); let gameData = SCREEN4.sort((item)=>Math.random(item.id)-0.5);
const GameScreenFourAll = ({navigation}) => { const AdvanceGameScreenFourAll = ({navigation}) => {
const shuffle = () => { const shuffle = () => {
gameData = SCREEN4.sort((item)=>Math.random(item.id)-0.5); gameData = SCREEN4.sort((item)=>Math.random(item.id)-0.5);
...@@ -38,7 +38,7 @@ const GameScreenFourAll = ({navigation}) => { ...@@ -38,7 +38,7 @@ const GameScreenFourAll = ({navigation}) => {
const renderImageItem = (itemData) => { const renderImageItem = (itemData) => {
return( return(
<TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('GameScreenFive')}}> <TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('AdvanceGameScreenFive')}}>
<Image style={styles.image} source={itemData.item.source}/> <Image style={styles.image} source={itemData.item.source}/>
</TouchableOpacity> </TouchableOpacity>
) )
...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({ ...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
}); });
export default GameScreenFourAll; export default AdvanceGameScreenFourAll;
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ import * as memoryActions from '../../../store/actions/memory'; ...@@ -7,7 +7,7 @@ import * as memoryActions from '../../../store/actions/memory';
import Levels from '../../../constants/Levels'; import Levels from '../../../constants/Levels';
import Countdown from '../../../constants/Countdown'; import Countdown from '../../../constants/Countdown';
const GameScreenOne = ({navigation}) => { const AdvanceGameScreenOne = ({navigation}) => {
// useEffect(()=>{ // useEffect(()=>{
// const backHandler = BackHandler.addEventListener('hardwareBackPress', () => true) // const backHandler = BackHandler.addEventListener('hardwareBackPress', () => true)
...@@ -17,7 +17,7 @@ const GameScreenOne = ({navigation}) => { ...@@ -17,7 +17,7 @@ const GameScreenOne = ({navigation}) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
useEffect(()=>{ useEffect(()=>{
dispatch(memoryActions.setGameLevel(Levels.elementry)) dispatch(memoryActions.setGameLevel(Levels.advance))
}) })
return( return(
...@@ -32,9 +32,9 @@ const GameScreenOne = ({navigation}) => { ...@@ -32,9 +32,9 @@ const GameScreenOne = ({navigation}) => {
<Text style={styles.imageText}>Pencil - පැන්සල</Text> <Text style={styles.imageText}>Pencil - පැන්සල</Text>
<CountDown <CountDown
size={40} size={40}
until={Countdown.elementry} until={Countdown.advance}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenOneAll')} onFinish={() => navigation.navigate('AdvanceGameScreenOneAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
digitTxtStyle={{color: '#1CC625'}} digitTxtStyle={{color: '#1CC625'}}
timeLabelStyle={{color: 'red', fontWeight: 'bold'}} timeLabelStyle={{color: 'red', fontWeight: 'bold'}}
...@@ -81,4 +81,4 @@ const styles = StyleSheet.create({ ...@@ -81,4 +81,4 @@ const styles = StyleSheet.create({
} }
}); });
export default GameScreenOne; export default AdvanceGameScreenOne;
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ import { SCREEN1 } from '../../../memory/data/elementry-level'; ...@@ -6,7 +6,7 @@ import { SCREEN1 } from '../../../memory/data/elementry-level';
let gameData = SCREEN1.sort((item)=>Math.random(item.id)-0.5); let gameData = SCREEN1.sort((item)=>Math.random(item.id)-0.5);
const GameScreenOneAll = ({navigation}) => { const AdvanceGameScreenOneAll = ({navigation}) => {
const shuffle = () => { const shuffle = () => {
gameData = SCREEN1.sort((item)=>Math.random(item.id)-0.5); gameData = SCREEN1.sort((item)=>Math.random(item.id)-0.5);
...@@ -38,7 +38,7 @@ const GameScreenOneAll = ({navigation}) => { ...@@ -38,7 +38,7 @@ const GameScreenOneAll = ({navigation}) => {
const renderImageItem = (itemData) => { const renderImageItem = (itemData) => {
return( return(
<TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = [];navigation.navigate('GameScreenTwo')}}> <TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = [];navigation.navigate('AdvanceGameScreenTwo')}}>
<Image style={styles.image} source={itemData.item.source}/> <Image style={styles.image} source={itemData.item.source}/>
</TouchableOpacity> </TouchableOpacity>
) )
...@@ -86,4 +86,4 @@ const styles = StyleSheet.create({ ...@@ -86,4 +86,4 @@ const styles = StyleSheet.create({
}); });
export default GameScreenOneAll; export default AdvanceGameScreenOneAll;
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native'; ...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import CountDown from 'react-native-countdown-component'; import CountDown from 'react-native-countdown-component';
import Countdown from '../../../constants/Countdown'; import Countdown from '../../../constants/Countdown';
const GameScreenSix = ({navigation}) => { const AdvanceGameScreenSix = ({navigation}) => {
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
...@@ -17,9 +17,9 @@ const GameScreenSix = ({navigation}) => { ...@@ -17,9 +17,9 @@ const GameScreenSix = ({navigation}) => {
<Text style={styles.imageText}>Pencil - පැන්සල</Text> <Text style={styles.imageText}>Pencil - පැන්සල</Text>
<CountDown <CountDown
size={40} size={40}
until={Countdown.elementry} until={Countdown.advance}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenSixAll')} onFinish={() => navigation.navigate('AdvanceGameScreenSixAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
digitTxtStyle={{color: '#1CC625'}} digitTxtStyle={{color: '#1CC625'}}
timeLabelStyle={{color: 'red', fontWeight: 'bold'}} timeLabelStyle={{color: 'red', fontWeight: 'bold'}}
...@@ -66,4 +66,4 @@ const GameScreenSix = ({navigation}) => { ...@@ -66,4 +66,4 @@ const GameScreenSix = ({navigation}) => {
} }
}); });
export default GameScreenSix; export default AdvanceGameScreenSix;
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ import { SCREEN6 } from '../../../memory/data/elementry-level'; ...@@ -6,7 +6,7 @@ import { SCREEN6 } from '../../../memory/data/elementry-level';
let gameData = SCREEN6.sort((item)=>Math.random(item.id)-0.5); let gameData = SCREEN6.sort((item)=>Math.random(item.id)-0.5);
const GameScreenSixAll = ({navigation}) => { const AdvanceGameScreenSixAll = ({navigation}) => {
const shuffle = () => { const shuffle = () => {
gameData = SCREEN6.sort((item)=>Math.random(item.id)-0.5); gameData = SCREEN6.sort((item)=>Math.random(item.id)-0.5);
...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({ ...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
}); });
export default GameScreenSixAll; export default AdvanceGameScreenSixAll;
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native'; ...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import CountDown from 'react-native-countdown-component'; import CountDown from 'react-native-countdown-component';
import Countdown from '../../../constants/Countdown'; import Countdown from '../../../constants/Countdown';
const GameScreenThree = ({navigation}) => { const AdvanceGameScreenThree = ({navigation}) => {
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
...@@ -17,9 +17,9 @@ const GameScreenThree = ({navigation}) => { ...@@ -17,9 +17,9 @@ const GameScreenThree = ({navigation}) => {
<Text style={styles.imageText}>Flower - මල</Text> <Text style={styles.imageText}>Flower - මල</Text>
<CountDown <CountDown
size={40} size={40}
until={Countdown.elementry} until={Countdown.advance}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenThreeAll')} onFinish={() => navigation.navigate('AdvanceGameScreenThreeAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
digitTxtStyle={{color: '#1CC625'}} digitTxtStyle={{color: '#1CC625'}}
timeLabelStyle={{color: 'red', fontWeight: 'bold'}} timeLabelStyle={{color: 'red', fontWeight: 'bold'}}
...@@ -66,4 +66,4 @@ const GameScreenThree = ({navigation}) => { ...@@ -66,4 +66,4 @@ const GameScreenThree = ({navigation}) => {
} }
}); });
export default GameScreenThree; export default AdvanceGameScreenThree;
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ import { SCREEN3 } from '../../../memory/data/elementry-level'; ...@@ -6,7 +6,7 @@ import { SCREEN3 } from '../../../memory/data/elementry-level';
let gameData = SCREEN3.sort((item)=>Math.random(item.id)-0.5); let gameData = SCREEN3.sort((item)=>Math.random(item.id)-0.5);
const GameScreenThreeAll = ({navigation}) => { const AdvanceGameScreenThreeAll = ({navigation}) => {
const shuffle = () => { const shuffle = () => {
gameData = SCREEN3.sort((item)=>Math.random(item.id)-0.5); gameData = SCREEN3.sort((item)=>Math.random(item.id)-0.5);
...@@ -38,7 +38,7 @@ const GameScreenThreeAll = ({navigation}) => { ...@@ -38,7 +38,7 @@ const GameScreenThreeAll = ({navigation}) => {
const renderImageItem = (itemData) => { const renderImageItem = (itemData) => {
return( return(
<TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('GameScreenFour')}}> <TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('AdvanceGameScreenFour')}}>
<Image style={styles.image} source={itemData.item.source}/> <Image style={styles.image} source={itemData.item.source}/>
</TouchableOpacity> </TouchableOpacity>
) )
...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({ ...@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
}); });
export default GameScreenThreeAll; export default AdvanceGameScreenThreeAll;
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native'; ...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import CountDown from 'react-native-countdown-component'; import CountDown from 'react-native-countdown-component';
import Countdown from '../../../constants/Countdown'; import Countdown from '../../../constants/Countdown';
const GameScreenTwo = ({navigation}) => { const AdvanceGameScreenTwo = ({navigation}) => {
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
...@@ -17,9 +17,9 @@ const GameScreenTwo = ({navigation}) => { ...@@ -17,9 +17,9 @@ const GameScreenTwo = ({navigation}) => {
<Text style={styles.imageText}>Ball - බෝලය</Text> <Text style={styles.imageText}>Ball - බෝලය</Text>
<CountDown <CountDown
size={40} size={40}
until={Countdown.elementry} until={Countdown.advance}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenTwoAll')} onFinish={() => navigation.navigate('AdvanceGameScreenTwoAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
digitTxtStyle={{color: '#1CC625'}} digitTxtStyle={{color: '#1CC625'}}
timeLabelStyle={{color: 'red', fontWeight: 'bold'}} timeLabelStyle={{color: 'red', fontWeight: 'bold'}}
...@@ -66,4 +66,4 @@ const GameScreenTwo = ({navigation}) => { ...@@ -66,4 +66,4 @@ const GameScreenTwo = ({navigation}) => {
} }
}); });
export default GameScreenTwo; export default AdvanceGameScreenTwo;
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ import { SCREEN2 } from '../../../memory/data/elementry-level'; ...@@ -7,7 +7,7 @@ import { SCREEN2 } from '../../../memory/data/elementry-level';
let gameData = SCREEN2.sort((item)=>Math.random(item.id)-0.5); let gameData = SCREEN2.sort((item)=>Math.random(item.id)-0.5);
const GameScreenTwoAll = ({navigation}) => { const AdvanceGameScreenTwoAll = ({navigation}) => {
const shuffle = () => { const shuffle = () => {
gameData = SCREEN2.sort((item)=>Math.random(item.id)-0.5); gameData = SCREEN2.sort((item)=>Math.random(item.id)-0.5);
...@@ -39,7 +39,7 @@ const GameScreenTwoAll = ({navigation}) => { ...@@ -39,7 +39,7 @@ const GameScreenTwoAll = ({navigation}) => {
const renderImageItem = (itemData) => { const renderImageItem = (itemData) => {
return( return(
<TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('GameScreenThree')}}> <TouchableOpacity activeOpacity={0.7} style={styles.imageItem} onPress={()=>{dispatch(memoryActions.setAnswers({question: itemData.item.question, answer: itemData.item.answer})); setTimeOn(false); dispatch(memoryActions.setTime({question: itemData.item.question, time: time})); gameData = []; navigation.navigate('AdvanceGameScreenThree')}}>
<Image style={styles.image} source={itemData.item.source}/> <Image style={styles.image} source={itemData.item.source}/>
</TouchableOpacity> </TouchableOpacity>
) )
...@@ -88,4 +88,4 @@ const styles = StyleSheet.create({ ...@@ -88,4 +88,4 @@ const styles = StyleSheet.create({
}); });
export default GameScreenTwoAll; export default AdvanceGameScreenTwoAll;
\ No newline at end of file \ No newline at end of file
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