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

coundown

parent 94b1377f
export default {
elementry: 5,
average: 3,
hard: 3
}
\ No newline at end of file
import React, {useState, useEffect} from 'react'; 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';
const GameScreenFive = ({navigation}) => { const GameScreenFive = ({navigation}) => {
...@@ -15,7 +16,7 @@ const GameScreenFive = ({navigation}) => { ...@@ -15,7 +16,7 @@ const GameScreenFive = ({navigation}) => {
</View> </View>
<CountDown <CountDown
size={40} size={40}
until={5} until={Countdown.elementry}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenFiveAll')} onFinish={() => navigation.navigate('GameScreenFiveAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
......
import React, {useState, useEffect} from 'react'; 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';
const GameScreenFour = ({navigation}) => { const GameScreenFour = ({navigation}) => {
...@@ -22,7 +23,7 @@ const GameScreenFour = ({navigation}) => { ...@@ -22,7 +23,7 @@ const GameScreenFour = ({navigation}) => {
<Text style={styles.imageText}>Car - කාරය</Text> <Text style={styles.imageText}>Car - කාරය</Text>
<CountDown <CountDown
size={40} size={40}
until={5} until={Countdown.elementry}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenFourAll')} onFinish={() => navigation.navigate('GameScreenFourAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
......
...@@ -5,6 +5,7 @@ import CountDown from 'react-native-countdown-component'; ...@@ -5,6 +5,7 @@ import CountDown from 'react-native-countdown-component';
import {useDispatch} from 'react-redux'; 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';
const GameScreenOne = ({navigation}) => { const GameScreenOne = ({navigation}) => {
...@@ -31,7 +32,7 @@ const GameScreenOne = ({navigation}) => { ...@@ -31,7 +32,7 @@ const GameScreenOne = ({navigation}) => {
<Text style={styles.imageText}>Pencil - පැන්සල</Text> <Text style={styles.imageText}>Pencil - පැන්සල</Text>
<CountDown <CountDown
size={40} size={40}
until={5} until={Countdown.elementry}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenOneAll')} onFinish={() => navigation.navigate('GameScreenOneAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
......
import React, {useState, useEffect} from 'react'; 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';
const GameScreenSix = ({navigation}) => { const GameScreenSix = ({navigation}) => {
...@@ -16,7 +17,7 @@ const GameScreenSix = ({navigation}) => { ...@@ -16,7 +17,7 @@ const GameScreenSix = ({navigation}) => {
<Text style={styles.imageText}>Pencil - පැන්සල</Text> <Text style={styles.imageText}>Pencil - පැන්සල</Text>
<CountDown <CountDown
size={40} size={40}
until={5} until={Countdown.elementry}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenSixAll')} onFinish={() => navigation.navigate('GameScreenSixAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
......
import React, {useState, useEffect} from 'react'; 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';
const GameScreenThree = ({navigation}) => { const GameScreenThree = ({navigation}) => {
...@@ -16,7 +17,7 @@ const GameScreenThree = ({navigation}) => { ...@@ -16,7 +17,7 @@ const GameScreenThree = ({navigation}) => {
<Text style={styles.imageText}>Flower - මල</Text> <Text style={styles.imageText}>Flower - මල</Text>
<CountDown <CountDown
size={40} size={40}
until={5} until={Countdown.elementry}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenThreeAll')} onFinish={() => navigation.navigate('GameScreenThreeAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
......
import React, {useState, useEffect} from 'react'; 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';
const GameScreenTwo = ({navigation}) => { const GameScreenTwo = ({navigation}) => {
...@@ -16,7 +17,7 @@ const GameScreenTwo = ({navigation}) => { ...@@ -16,7 +17,7 @@ const GameScreenTwo = ({navigation}) => {
<Text style={styles.imageText}>Ball - බෝලය</Text> <Text style={styles.imageText}>Ball - බෝලය</Text>
<CountDown <CountDown
size={40} size={40}
until={5} until={Countdown.elementry}
// onFinish={() => alert('Finished')} // onFinish={() => alert('Finished')}
onFinish={() => navigation.navigate('GameScreenTwoAll')} onFinish={() => navigation.navigate('GameScreenTwoAll')}
digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}} digitStyle={{backgroundColor: '#FFF', borderWidth: 2, borderColor: '#1CC625'}}
......
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