Commit f870be54 authored by Neranga K.T.'s avatar Neranga K.T.

.

parent 34f048b4
...@@ -60,17 +60,20 @@ def get_level(): ...@@ -60,17 +60,20 @@ def get_level():
results=[{"level":float(result)}] results=[{"level":float(result)}]
return (jsonify(results=results)) return (jsonify(results=results))
# userpass = 'mysql://root:''@' userpass = 'mysql://root:''@'
# basedir = '127.0.0.1' basedir = '127.0.0.1'
# dbname = '/helply' dbname = '/helply'
# socket = '?unix_socket=/opt/lampp/var/mysql/mysql.sock' socket = '?unix_socket=/opt/lampp/var/mysql/mysql.sock'
# dbname = dbname + socket dbname = dbname + socket
# app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname # app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname
# app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://sql5488870:UylH12yrME@sql5.freesqldatabase.com/sql5488870' # app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://sql5488870:UylH12yrME@sql5.freesqldatabase.com/sql5488870'
# app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False # app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://sql6506712:VUMTB3RZJi@sql6.freesqldatabase.com/sql6506712' # app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://sql6506712:VUMTB3RZJi@sql6.freesqldatabase.com/sql6506712'
# app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
#DB Connection #DB Connection
...@@ -127,13 +130,15 @@ def add_result(): ...@@ -127,13 +130,15 @@ def add_result():
#GET method #GET method
@app.route('/el_result', methods = ['GET']) @app.route('/el_result', methods = ['GET'])
def get_articles(): def get_articles():
all_results = MemoryResults.query.with_entities(MemoryResults.name, MemoryResults.time_duration, MemoryResults.result).all() all_results = MemoryResults.query.filter_by(game_level='elementry_level').all()
return all_results results = results_schema.dump(all_results)
# results = results_schema.dump(all_results) return jsonify(results)
# return jsonify(results)
# qry = 'SELECT name,time_duration,result FROM memory_results' @app.route('/md_result', methods = ['GET'])
# new = jsonify(get_data(qry)) def get_md_results():
# return make_response(new) all_results = MemoryResults.query.filter_by(game_level='medium_level').all()
results = results_schema.dump(all_results)
return jsonify(results)
#run the flask file #run the flask file
......
import React, {useEffect, useState} from 'react'; import React, {useEffect, useState} from 'react';
import {View, StyleSheet, ScrollView} from 'react-native'; import {View, StyleSheet, ScrollView, Text, FlatList} from 'react-native';
import { import {
Table, Table,
TableWrapper, TableWrapper,
...@@ -14,11 +14,16 @@ import {color} from 'react-native-reanimated'; ...@@ -14,11 +14,16 @@ import {color} from 'react-native-reanimated';
import endpoint from '../../constants/endpoint'; import endpoint from '../../constants/endpoint';
import axios from 'axios'; import axios from 'axios';
export default function TableList() { export default function ResultTable(props) {
const [tableData, setTableData] = useState({ // const [tableData, setTableData] = useState({
tableHead: [], // tableHead: [],
data: [], // data: [],
}); // });
// const [loading, setIsLoading] = useState(true);
console.log(props.level);
const [data, setData] = useState([]);
const [loading, setIsLoading] = useState(true); const [loading, setIsLoading] = useState(true);
// useEffect(() => { // useEffect(() => {
...@@ -47,19 +52,27 @@ export default function TableList() { ...@@ -47,19 +52,27 @@ export default function TableList() {
// }); // });
// } // }
// useEffect(() => { const renderData = (item) => {
// // getResult(userId); return(
// }, []); <View style={styles.cartItem} >
<View style={styles.tr}>
<Text style={styles.td}>{item.name}</Text>
<Text style={styles.td}>{item.time_duration}</Text>
<Text style={styles.td}>{item.result}</Text>
</View>
</View>
);
}
const loadData = () => { const loadData = () => {
axios(`${endpoint}/el_result`,{ fetch(`${endpoint}/${props.level}`,{
method: 'GET' method: 'GET'
}) })
.then(resp=>resp.json())
.then(result => { .then(result => {
console.log('terra',result.data); console.log('terra',result.data);
// setTableData({ setData(result)
// tableHead: ['Name', 'Time Duration', 'Level'], setIsLoading(false)
// data: result.data
// });
}) })
.catch(error => console.log(error)) .catch(error => console.log(error))
} }
...@@ -68,25 +81,24 @@ useEffect(()=>{ ...@@ -68,25 +81,24 @@ useEffect(()=>{
loadData(); loadData();
},[]); },[]);
return ( return (
<ScrollView> <ScrollView>
<View style={styles.container}> <View style={styles.container}>
<Table borderStyle={{borderWidth: 3, borderColor: '#fff'}}> <View style={styles.theadWrapper}>
<Row <Text style={styles.thead }>Name</Text>
data={tableData.tableHead} <Text style={styles.thead }>Time Duration</Text>
flexArr={[ 1, 1.4, 1.3]} <Text style={styles.thead }>Result</Text>
style={styles.head} </View>
textStyle={styles.text} <FlatList
/> data={data}
<TableWrapper style={styles.wrapper}> renderItem = {({item})=>{
<Rows return renderData(item)
data={tableData.data} }}
flexArr={[1, 1.4, 1.3]} onRefresh={()=> loadData()}
style={styles.row} refreshing = {loading}
textStyle={styles.text} keyExtractor={item=>`${item.id}`}
/> />
</TableWrapper>
</Table>
</View> </View>
</ScrollView> </ScrollView>
); );
...@@ -96,8 +108,7 @@ const styles = StyleSheet.create({ ...@@ -96,8 +108,7 @@ const styles = StyleSheet.create({
container: { container: {
flex: 0, flex: 0,
paddingTop: 40, paddingTop: 40,
paddingLeft: 60, paddingHorizontal: 20,
paddingRight: 60,
marginTop: 0, marginTop: 0,
}, },
head: {height: 60, backgroundColor: 'green'}, head: {height: 60, backgroundColor: 'green'},
...@@ -108,4 +119,31 @@ const styles = StyleSheet.create({ ...@@ -108,4 +119,31 @@ const styles = StyleSheet.create({
title: {flex: 1}, title: {flex: 1},
row: {height: 40}, row: {height: 40},
text: {textAlign: 'center', fontSize: 20, color: 'black'}, text: {textAlign: 'center', fontSize: 20, color: 'black'},
theadWrapper: {
flexDirection: 'row',
justifyContent: 'space-between',
backgroundColor: 'green'
},
thead: {
fontSize: 22,
fontWeight: 'bold',
color: 'white',
paddingVertical: 10,
paddingHorizontal: 10
},
tr: {
flexDirection: 'row',
justifyContent: 'space-between',
backgroundColor: '#33cc00',
paddingHorizontal: 10,
paddingVertical: 5,
borderBottomColor: 'black',
marginBottom: 2
},
td: {
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
color: 'white'
}
}); });
...@@ -65,6 +65,7 @@ import AdvanceGameScreenSix from '../screen/memory/advance/AdvanceGameScreenSix' ...@@ -65,6 +65,7 @@ import AdvanceGameScreenSix from '../screen/memory/advance/AdvanceGameScreenSix'
import AdvanceGameScreenSixAll from '../screen/memory/advance/AdvanceGameScreenSixAll'; import AdvanceGameScreenSixAll from '../screen/memory/advance/AdvanceGameScreenSixAll';
import GameOverScreen from '../screen/memory/GameOverScreen'; import GameOverScreen from '../screen/memory/GameOverScreen';
import MemoryResult from '../screen/memory/Results/ElementryResults'; import MemoryResult from '../screen/memory/Results/ElementryResults';
import MediumResults from '../screen/memory/Results/MediumResults';
import GameLevel from '../screen/memory/GameLevel'; import GameLevel from '../screen/memory/GameLevel';
import MediumLevelStart from '../screen/memory/MediumLevelStart'; import MediumLevelStart from '../screen/memory/MediumLevelStart';
import AdvanceLevelStart from '../screen/memory/AdvanceLevelStart'; import AdvanceLevelStart from '../screen/memory/AdvanceLevelStart';
...@@ -310,6 +311,16 @@ const AppRouter = () => { ...@@ -310,6 +311,16 @@ const AppRouter = () => {
headerStyle: {backgroundColor: '#5fcf93'}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen
name="MediumResults"
component={MediumResults}
options={{
headerShown: true,
title: 'Results',
headerTintColor: 'white',
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen <Stack.Screen
name="GameLevel" name="GameLevel"
component={GameLevel} component={GameLevel}
......
...@@ -26,7 +26,9 @@ const ResultCategory = ({navigation}) => { ...@@ -26,7 +26,9 @@ const ResultCategory = ({navigation}) => {
<ScrollView> <ScrollView>
<View style={{ marginBottom: 20 }}> <View style={{ marginBottom: 20 }}>
<View style={styles.gameItemRow}> <View style={styles.gameItemRow}>
<ImageBackground source={{ uri: 'https://cdn.pixabay.com/photo/2014/09/21/21/31/flowers-455591_960_720.jpg' }} <ImageBackground
source={{ uri: 'https://cdn.pixabay.com/photo/2014/09/21/21/31/flowers-455591_960_720.jpg' }}
//source={require('../../memory/images/assets/ReadHeaderImg45.jpg')}
style={styles.image}> style={styles.image}>
{/* <Text style={styles.title}>Play Memo</Text> */} {/* <Text style={styles.title}>Play Memo</Text> */}
<View style={styles.titleContainer}> <View style={styles.titleContainer}>
...@@ -37,14 +39,14 @@ const ResultCategory = ({navigation}) => { ...@@ -37,14 +39,14 @@ const ResultCategory = ({navigation}) => {
</View> </View>
<View style={styles.screen} > <View style={styles.screen} >
<MainButton styles={styles.elementryBtn} onPress={()=>{navigation.navigate('ElementryResults')}}> <MainButton styles={styles.elementryBtn} onPress={()=>{navigation.navigate('ElementryResults')}}>
<Icon name="unlock-alt" type="font-awesome" size={36} color="white" /> Elementry Elementry Level
</MainButton> </MainButton>
<MainButton styles={styles.mediumBtn} onPress={()=>{}}> <MainButton styles={styles.mediumBtn} onPress={()=>{navigation.navigate('MediumResults')}}>
{/* navigation.navigate('MediumLevelStart') */} {/* navigation.navigate('MediumLevelStart') */}
<Icon name="unlock-alt" type="font-awesome" size={36} color="white" /> Medium Medium Level
</MainButton> </MainButton>
<MainButton styles={styles.advanceBtn} onPress={()=>{}}> <MainButton styles={styles.advanceBtn} onPress={()=>{}}>
<Icon name="lock" type="font-awesome" size={36} color="white" /> Advance Advance Level
</MainButton> </MainButton>
</View> </View>
</ScrollView> </ScrollView>
......
...@@ -95,7 +95,9 @@ export default function ElementryResults() { ...@@ -95,7 +95,9 @@ export default function ElementryResults() {
</View> </View>
<View style={styles.imageContainer}> <View style={styles.imageContainer}>
{/* <View > */} {/* <View > */}
<ResultTable/> <ResultTable
level = 'el_result'
/>
{/* </View> */} {/* </View> */}
</View> </View>
<View> <View>
......
// import React from 'react';
// import {View, Text, StyleSheet} from 'react-native';
// const MemoryResult = () => {
// return(
// <View style={styles.screen}>
// </View>
// );
// }
// const styles = StyleSheet.create({
// screen: {
// flex: 1,
// padding: 10
// }
// });
// export default MemoryResult;
import React, {useEffect, useState} from 'react';
import {
StyleSheet,
View,
Text,
Pressable,
ImageBackground,
TouchableOpacity,
Image,
ScrollView,
StatusBar,
} from 'react-native';
import {SafeAreaView} from 'react-native-safe-area-context';
import Orientation from 'react-native-orientation-locker';
import {useNavigation} from '@react-navigation/native';
// import BackButton from '../../../component/BackButton';
// import TableList from '../../component/reading/TableList';
import ResultTable from '../../../component/memory/ResultTable';
import { ImagePaths } from '../../../assets/read/data/ReadData';
import {
Table,
TableWrapper,
Row,
Rows,
Col,
} from 'react-native-table-component';
export default function MediumResults() {
const navigation = useNavigation();
React.useEffect(() => {
StatusBar.setHidden(true);
// getColorResult();
const unsubscribe = navigation.addListener('focus', () => {
// The screen is focused
// Call any action
Orientation.unlockAllOrientations();
Orientation.lockToPortrait();
});
return unsubscribe;
}, [navigation]);
return (
// <SafeAreaView>
// <ScrollView>
// <View style={{flexDirection: 'column'}}>
// <ImageBackground
// style={styles.image}
// source={ImagePaths.backgroundBasic}>
// {/* <View><BackButton path="Color" /></View> */}
// {/* <View style={styles.container}>
// <Image
// style={styles.logo}
// source={require('../../../assets/result/title.png')}
// />
// </View> */}
// <View style={styles.imageContainer}>{/* <TableList /> */}</View>
// </ImageBackground>
// </View>
// </ScrollView>
// </SafeAreaView>
<SafeAreaView>
<View style={{flexDirection: 'column'}}>
<ImageBackground
style={styles.image}
source={ImagePaths.resultBackground}>
<View style={styles.textBody}>
<Text style={styles.text}>Your Results</Text>
</View>
<View style={styles.imageContainer}>
{/* <View > */}
<ResultTable
level = 'md_result'
/>
{/* </View> */}
</View>
<View>
<Image style={styles.temp} source={ImagePaths.chart}></Image>
</View>
</ImageBackground>
</View>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
image: {
width: '100%',
height: '100%',
},
container: {
// backgroundColor : '#fff',
marginTop: 30,
justifyContent: 'center',
alignItems: 'center',
},
logo: {
marginTop: 80,
width: '30%',
height: '30%',
},
imageContainer: {
flexDirection: 'row',
marginTop: 1,
},
textBody: {
marginTop: 10,
marginLeft: 90,
// backgroundColor: '#00008B',
width: 220,
borderRadius: 50,
padding: 5,
},
text: {
fontSize: 35,
justifyContent: 'center',
alignItems: 'center',
color: 'black',
borderRadius: 10,
backgroundColor: 'rgba(2, 202, 106, 0.17)',
textAlign: 'center',
fontWeight: 'bold',
},
temp: {
marginTop: 100,
marginLeft: 80,
// backgroundColor: '#00008B',
width: 220,
height: 200,
borderRadius: 50,
padding: 5,
},
});
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const GameScreenFive = ({navigation}) => { const GameScreenFive = ({navigation}) => {
useEffect(()=>{
Tts.speak('Fish', {
androidParams: {
KEY_PARAM_PAN: 0.6,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const GameScreenFour = ({navigation}) => { const GameScreenFour = ({navigation}) => {
useEffect(()=>{
Tts.speak('Car', {
androidParams: {
KEY_PARAM_PAN: 0.6,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -6,6 +6,7 @@ import {useDispatch} from 'react-redux'; ...@@ -6,6 +6,7 @@ import {useDispatch} from 'react-redux';
import * as memoryActions from '../../../store/actions/memory'; 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';
import Tts from 'react-native-tts';
const GameScreenOne = ({navigation}) => { const GameScreenOne = ({navigation}) => {
...@@ -17,6 +18,13 @@ const GameScreenOne = ({navigation}) => { ...@@ -17,6 +18,13 @@ const GameScreenOne = ({navigation}) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
useEffect(()=>{ useEffect(()=>{
Tts.speak('Pencil', {
androidParams: {
KEY_PARAM_PAN: 0.6,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
dispatch(memoryActions.setGameLevel(Levels.elementry)) dispatch(memoryActions.setGameLevel(Levels.elementry))
}) })
......
...@@ -2,9 +2,21 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,21 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const GameScreenSix = ({navigation}) => { const GameScreenSix = ({navigation}) => {
useEffect(()=>{
Tts.speak('Kite', {
androidParams: {
KEY_PARAM_PAN: 0.6,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const GameScreenThree = ({navigation}) => { const GameScreenThree = ({navigation}) => {
useEffect(()=>{
Tts.speak('Flower', {
androidParams: {
KEY_PARAM_PAN: 0.6,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const GameScreenTwo = ({navigation}) => { const GameScreenTwo = ({navigation}) => {
useEffect(()=>{
Tts.speak('Ball', {
androidParams: {
KEY_PARAM_PAN: 0.6,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const MediumGameScreenFive = ({navigation}) => { const MediumGameScreenFive = ({navigation}) => {
useEffect(()=>{
Tts.speak('Shadow of Horse', {
androidParams: {
KEY_PARAM_PAN: 1,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
...@@ -28,7 +39,7 @@ const MediumGameScreenFive = ({navigation}) => { ...@@ -28,7 +39,7 @@ const MediumGameScreenFive = ({navigation}) => {
timeLabels={{s: 'Seconds'}} timeLabels={{s: 'Seconds'}}
style={styles.counter} style={styles.counter}
/> />
<Text style={styles.imageText}>Fish - මාළුවා</Text> {/* <Text style={styles.imageText}>Fish - මාළුවා</Text> */}
</View> </View>
); );
} }
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const MediumGameScreenFour = ({navigation}) => { const MediumGameScreenFour = ({navigation}) => {
useEffect(()=>{
Tts.speak('A boy with a balloon', {
androidParams: {
KEY_PARAM_PAN: 1,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -6,6 +6,7 @@ import {useDispatch} from 'react-redux'; ...@@ -6,6 +6,7 @@ import {useDispatch} from 'react-redux';
import * as memoryActions from '../../../store/actions/memory'; 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';
import Tts from 'react-native-tts';
const MediumGameScreenOne = ({navigation}) => { const MediumGameScreenOne = ({navigation}) => {
...@@ -17,7 +18,14 @@ const MediumGameScreenOne = ({navigation}) => { ...@@ -17,7 +18,14 @@ const MediumGameScreenOne = ({navigation}) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
useEffect(()=>{ useEffect(()=>{
dispatch(memoryActions.setGameLevel(Levels.medium)) dispatch(memoryActions.setGameLevel(Levels.medium));
Tts.speak('Birds', {
androidParams: {
KEY_PARAM_PAN: 1,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
}) })
return( return(
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const MediumGameScreenSix = ({navigation}) => { const MediumGameScreenSix = ({navigation}) => {
useEffect(()=>{
Tts.speak('Arrow', {
androidParams: {
KEY_PARAM_PAN: 1,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const MediumGameScreenThree = ({navigation}) => { const MediumGameScreenThree = ({navigation}) => {
useEffect(()=>{
Tts.speak('Circle and Rectangle', {
androidParams: {
KEY_PARAM_PAN: 1,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
......
...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react'; ...@@ -2,9 +2,20 @@ import React, {useState, useEffect} from 'react';
import {View, Text, StyleSheet, Image} from 'react-native'; 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';
import Tts from 'react-native-tts';
const MediumGameScreenTwo = ({navigation}) => { const MediumGameScreenTwo = ({navigation}) => {
useEffect(()=>{
Tts.speak('A boy with a bicycle', {
androidParams: {
KEY_PARAM_PAN: 1,
KEY_PARAM_VOLUME: 0.6,
KEY_PARAM_STREAM: 'STREAM_MUSIC',
},
});
});
return( return(
<View style={styles.sreen}> <View style={styles.sreen}>
<Text></Text> <Text></Text>
...@@ -14,7 +25,7 @@ const MediumGameScreenTwo = ({navigation}) => { ...@@ -14,7 +25,7 @@ const MediumGameScreenTwo = ({navigation}) => {
style={styles.image} style={styles.image}
/> />
</View> </View>
<Text style={styles.imageText}>Boy with a bicycle</Text> <Text style={styles.imageText}>A boy with a bicycle</Text>
<CountDown <CountDown
size={40} size={40}
until={Countdown.medium} until={Countdown.medium}
......
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