-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
78 lines (76 loc) · 1.47 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import React from "react";
import { StyleSheet, View, Image } from "react-native";
import { Constants } from "./util/utils";
import { Images } from "./assets/Images";
import Game from "./components/Game";
export default function App() {
return (
<View style={styles.container}>
<Image
source={Images.background}
style={styles.backgroundImage}
resizeMode="stretch"
/>
<Game />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
},
backgroundImage: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
width: Constants.MAX_WIDTH,
height: Constants.MAX_HEIGHT,
},
gameContainer: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
},
gameOverText: {
color: "white",
fontSize: 48,
},
gameOverSubText: {
color: "white",
fontSize: 24,
},
fullScreen: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
backgroundColor: "black",
opacity: 0.8,
justifyContent: "center",
alignItems: "center",
},
score: {
position: "absolute",
color: "white",
fontSize: 72,
top: 50,
left: Constants.MAX_WIDTH / 2 - 20,
textShadowColor: "#444444",
textShadowOffset: { width: 2, height: 2 },
textShadowRadius: 2,
},
fullScreenButton: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
flex: 1,
},
});