-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd47726
commit 4d42b63
Showing
9 changed files
with
196 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native' | ||
import React from 'react' | ||
import { useNavigation } from "@react-navigation/core"; | ||
|
||
const GameOverButton = () => { | ||
const navigation = useNavigation(); | ||
|
||
return ( | ||
<TouchableOpacity | ||
onPress={() => navigation.navigate('Home')} | ||
style={{ | ||
backgroundColor: "#FFB84C", | ||
borderRadius: 0, width: "100%", | ||
padding: 15, | ||
alignItems: "center", | ||
position: 'absolute', | ||
bottom: 0, | ||
alignSelf: 'center', | ||
}}> | ||
<View style={{ flexDirection: "row", alignItems: "center" }}> | ||
<Text style={{ fontSize: 30, fontWeight: "bold", color: "red" }}> | ||
GAME OVER | ||
</Text> | ||
<View style={{ alignItems: "center" }}> | ||
<Text style={{ fontSize: 20, fontWeight: "bold", color: "#fff", marginLeft: 10, }}> | ||
Tap to | ||
</Text> | ||
<Text style={{ fontSize: 20, fontWeight: "bold", color: "#fff", marginLeft: 10, }}> | ||
Continue | ||
</Text> | ||
</View> | ||
</View> | ||
</TouchableOpacity> | ||
) | ||
} | ||
|
||
export default GameOverButton | ||
|
||
const styles = StyleSheet.create({}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { StyleSheet, Text, View } from 'react-native' | ||
import React, { useEffect, useState } from 'react' | ||
import { giveHighScore } from '../utils/storage_utils' | ||
|
||
const HighScore = (props: any) => { | ||
return ( | ||
<View | ||
style={{ | ||
backgroundColor: "#FFB84C", | ||
borderRadius: 10, | ||
paddingHorizontal: 20, | ||
alignItems: "center", | ||
position: 'absolute', | ||
top: 15, | ||
right: 15, | ||
alignSelf: 'center', | ||
}}> | ||
<Text style={{ fontSize: 25, fontWeight: "bold", color: "#fff" }}> | ||
{props.highScore} | ||
|
||
</Text> | ||
</View> | ||
) | ||
} | ||
|
||
export default HighScore | ||
|
||
const styles = StyleSheet.create({ | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { StyleSheet, Text, View } from 'react-native' | ||
import React from 'react' | ||
|
||
const Score = (props: any) => { | ||
return ( | ||
<View | ||
style={{ | ||
backgroundColor: "#fff", | ||
borderRadius: 0, width: "100%", | ||
padding: 1, | ||
alignItems: "center", | ||
position: 'absolute', | ||
bottom: "45%", | ||
alignSelf: 'center', | ||
}}> | ||
<Text style={{ fontSize: 40, fontWeight: "bold", color: "#000" }}> | ||
{props.score} | ||
</Text> | ||
</View> | ||
) | ||
} | ||
|
||
export default Score | ||
|
||
const styles = StyleSheet.create({ | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.