Browse Source

Added game score save support

Arnaud Vergnet 1 year ago
parent
commit
b2ff90855f

+ 5
- 3
locales/en.json View File

@@ -366,9 +366,11 @@
366 366
       "welcomeTitle": "Welcome !",
367 367
       "welcomeMessage": "Stuck on the toilet? The teacher is late?\nThis game is for you!\n\nTry to get the best score and beat your friends.",
368 368
       "play": "Play!",
369
-      "score": "Score : %{score}",
370
-      "time": "Time :",
371
-      "level": "Level :",
369
+      "score": "Score: %{score}",
370
+      "highScore": "High score: %{score}",
371
+      "newHighScore": "New High Score!",
372
+      "time": "Time:",
373
+      "level": "Level:",
372 374
       "pause": "Game Paused",
373 375
       "pauseMessage": "The game is paused",
374 376
       "resume": "Resume",

+ 2
- 0
locales/fr.json View File

@@ -366,6 +366,8 @@
366 366
       "welcomeMessage": "Coincé sur les WC ? Le prof est pas là ?\nCe jeu est fait pour toi !\n\nEssaie d'avoir le meilleur score et de battre tes amis.",
367 367
       "play": "Jouer !",
368 368
       "score": "Score : %{score}",
369
+      "highScore": "Meilleur score : %{score}",
370
+      "newHighScore": "Meilleur score !",
369 371
       "time": "Temps :",
370 372
       "level": "Niveau :",
371 373
       "pause": "Pause",

+ 6
- 13
src/components/Mascot/MascotPopup.js View File

@@ -6,6 +6,7 @@ import Mascot from "./Mascot";
6 6
 import * as Animatable from "react-native-animatable";
7 7
 import {BackHandler, Dimensions, ScrollView, TouchableWithoutFeedback, View} from "react-native";
8 8
 import type {CustomTheme} from "../../managers/ThemeManager";
9
+import SpeechArrow from "./SpeechArrow";
9 10
 
10 11
 type Props = {
11 12
     visible: boolean,
@@ -102,19 +103,11 @@ class MascotPopup extends React.Component<Props, State> {
102 103
                 animation={this.props.visible ? "bounceInLeft" : "bounceOutLeft"}
103 104
                 duration={this.props.visible ? 1000 : 300}
104 105
             >
105
-                <View style={{
106
-                    marginLeft: this.mascotSize / 3,
107
-                    width: 0,
108
-                    height: 0,
109
-                    borderLeftWidth: 0,
110
-                    borderRightWidth: 20,
111
-                    borderBottomWidth: 20,
112
-                    borderStyle: 'solid',
113
-                    backgroundColor: 'transparent',
114
-                    borderLeftColor: 'transparent',
115
-                    borderRightColor: 'transparent',
116
-                    borderBottomColor: this.props.theme.colors.mascotMessageArrow,
117
-                }}/>
106
+                <SpeechArrow
107
+                    style={{marginLeft: this.mascotSize / 3}}
108
+                    size={20}
109
+                    color={this.props.theme.colors.mascotMessageArrow}
110
+                />
118 111
                 <Card style={{
119 112
                     borderColor: this.props.theme.colors.mascotMessageArrow,
120 113
                     borderWidth: 4,

+ 33
- 0
src/components/Mascot/SpeechArrow.js View File

@@ -0,0 +1,33 @@
1
+// @flow
2
+
3
+import * as React from 'react';
4
+import {View} from "react-native";
5
+import type {ViewStyle} from "react-native/Libraries/StyleSheet/StyleSheet";
6
+
7
+type Props = {
8
+    style?: ViewStyle,
9
+    size: number,
10
+    color: string,
11
+}
12
+
13
+export default class SpeechArrow extends React.Component<Props> {
14
+
15
+    render() {
16
+        return (
17
+            <View style={this.props.style}>
18
+                <View style={{
19
+                    width: 0,
20
+                    height: 0,
21
+                    borderLeftWidth: 0,
22
+                    borderRightWidth: this.props.size,
23
+                    borderBottomWidth: this.props.size,
24
+                    borderStyle: 'solid',
25
+                    backgroundColor: 'transparent',
26
+                    borderLeftColor: 'transparent',
27
+                    borderRightColor: 'transparent',
28
+                    borderBottomColor: this.props.color,
29
+                }}/>
30
+            </View>
31
+        );
32
+    }
33
+}

+ 5
- 0
src/managers/AsyncStorageManager.js View File

@@ -136,6 +136,11 @@ export default class AsyncStorageManager {
136 136
             ]),
137 137
             current: '',
138 138
         },
139
+        gameScores: {
140
+            key: 'gameScores',
141
+            default: '[]',
142
+            current: '',
143
+        },
139 144
     };
140 145
 
141 146
     /**

+ 12
- 0
src/managers/ThemeManager.js View File

@@ -56,6 +56,10 @@ export type CustomTheme = {
56 56
         tetrisJ: string,
57 57
         tetrisL: string,
58 58
 
59
+        gameGold: string,
60
+        gameSilver: string,
61
+        gameBronze: string,
62
+
59 63
         // Mascot Popup
60 64
         mascotMessageArrow: string,
61 65
     },
@@ -129,6 +133,10 @@ export default class ThemeManager {
129 133
                 tetrisJ: '#2a67e3',
130 134
                 tetrisL: '#da742d',
131 135
 
136
+                gameGold: "#ffd610",
137
+                gameSilver: "#7b7b7b",
138
+                gameBronze: "#a15218",
139
+
132 140
                 // Mascot Popup
133 141
                 mascotMessageArrow: "#dedede",
134 142
             },
@@ -191,6 +199,10 @@ export default class ThemeManager {
191 199
                 tetrisJ: '#0f37b9',
192 200
                 tetrisL: '#b96226',
193 201
 
202
+                gameGold: "#ffd610",
203
+                gameSilver: "#7b7b7b",
204
+                gameBronze: "#a15218",
205
+
194 206
                 // Mascot Popup
195 207
                 mascotMessageArrow: "#323232",
196 208
             },

+ 56
- 34
src/screens/Game/screens/GameMainScreen.js View File

@@ -17,6 +17,7 @@ import OptionsDialog from "../../../components/Dialogs/OptionsDialog";
17 17
 
18 18
 type Props = {
19 19
     navigation: StackNavigationProp,
20
+    route: { params: { highScore: number }, ... },
20 21
     theme: CustomTheme,
21 22
 }
22 23
 
@@ -37,6 +38,7 @@ type State = {
37 38
 class GameMainScreen extends React.Component<Props, State> {
38 39
 
39 40
     logic: GameLogic;
41
+    highScore: number | null;
40 42
 
41 43
     constructor(props) {
42 44
         super(props);
@@ -54,8 +56,8 @@ class GameMainScreen extends React.Component<Props, State> {
54 56
             onDialogDismiss: () => {
55 57
             },
56 58
         };
57
-        this.props.navigation.addListener('blur', this.onScreenBlur);
58
-        this.props.navigation.addListener('focus', this.onScreenFocus);
59
+        if (this.props.route.params != null)
60
+            this.highScore = this.props.route.params.highScore;
59 61
     }
60 62
 
61 63
     componentDidMount() {
@@ -71,21 +73,6 @@ class GameMainScreen extends React.Component<Props, State> {
71 73
         </MaterialHeaderButtons>;
72 74
     }
73 75
 
74
-    /**
75
-     * Remove any interval on un-focus
76
-     */
77
-    onScreenBlur = () => {
78
-        if (!this.logic.isGamePaused())
79
-            this.logic.togglePause();
80
-    }
81
-
82
-    onScreenFocus = () => {
83
-        if (!this.logic.isGameRunning())
84
-            this.startGame();
85
-        else if (this.logic.isGamePaused())
86
-            this.showPausePopup();
87
-    }
88
-
89 76
     getFormattedTime(seconds: number) {
90 77
         let date = new Date();
91 78
         date.setHours(0);
@@ -221,7 +208,14 @@ class GameMainScreen extends React.Component<Props, State> {
221 208
             gameRunning: false,
222 209
         });
223 210
         if (!isRestart)
224
-            this.showGameOverConfirm();
211
+            this.props.navigation.replace(
212
+                "game-start",
213
+                {
214
+                    score: this.state.gameScore,
215
+                    level: this.state.gameLevel,
216
+                    time: this.state.gameTime,
217
+                }
218
+            );
225 219
     }
226 220
 
227 221
     getStatusIcons() {
@@ -281,28 +275,56 @@ class GameMainScreen extends React.Component<Props, State> {
281 275
     }
282 276
 
283 277
     getScoreIcon() {
278
+        let highScore = this.highScore == null || this.state.gameScore > this.highScore
279
+            ? this.state.gameScore
280
+            : this.highScore;
284 281
         return (
285 282
             <View style={{
286
-                flexDirection: "row",
287
-                marginLeft: "auto",
288
-                marginRight: "auto",
289 283
                 marginTop: 10,
290 284
                 marginBottom: 10,
291 285
             }}>
292
-                <Text style={{
293
-                    marginLeft: 5,
294
-                    fontSize: 22,
295
-                }}>{i18n.t("screens.game.score", {score: this.state.gameScore})}</Text>
296
-                <MaterialCommunityIcons
297
-                    name={'star'}
298
-                    color={this.props.theme.colors.tetrisScore}
299
-                    size={20}
300
-                style={{
301
-                    marginTop: "auto",
302
-                    marginBottom: "auto",
303
-                    marginLeft: 5
304
-                }}/>
286
+                <View style={{
287
+                    flexDirection: "row",
288
+                    marginLeft: "auto",
289
+                    marginRight: "auto",
290
+                }}>
291
+                    <Text style={{
292
+                        marginLeft: 5,
293
+                        fontSize: 20,
294
+                    }}>{i18n.t("screens.game.score", {score: this.state.gameScore})}</Text>
295
+                    <MaterialCommunityIcons
296
+                        name={'star'}
297
+                        color={this.props.theme.colors.tetrisScore}
298
+                        size={20}
299
+                        style={{
300
+                            marginTop: "auto",
301
+                            marginBottom: "auto",
302
+                            marginLeft: 5
303
+                        }}/>
304
+                </View>
305
+                <View style={{
306
+                    flexDirection: "row",
307
+                    marginLeft: "auto",
308
+                    marginRight: "auto",
309
+                    marginTop: 5,
310
+                }}>
311
+                    <Text style={{
312
+                        marginLeft: 5,
313
+                        fontSize: 10,
314
+                        color: this.props.theme.colors.textDisabled
315
+                    }}>{i18n.t("screens.game.highScore", {score: highScore})}</Text>
316
+                    <MaterialCommunityIcons
317
+                        name={'star'}
318
+                        color={this.props.theme.colors.tetrisScore}
319
+                        size={10}
320
+                        style={{
321
+                            marginTop: "auto",
322
+                            marginBottom: "auto",
323
+                            marginLeft: 5
324
+                        }}/>
325
+                </View>
305 326
             </View>
327
+
306 328
         );
307 329
     }
308 330
 

+ 307
- 31
src/screens/Game/screens/GameStartScreen.js View File

@@ -3,8 +3,8 @@
3 3
 import * as React from "react";
4 4
 import {StackNavigationProp} from "@react-navigation/stack";
5 5
 import type {CustomTheme} from "../../../managers/ThemeManager";
6
-import {Button, Card, Divider, Headline, Paragraph, withTheme} from "react-native-paper";
7
-import {View} from "react-native";
6
+import {Button, Card, Divider, Headline, Paragraph, Text, withTheme} from "react-native-paper";
7
+import {ScrollView, View} from "react-native";
8 8
 import i18n from "i18n-js";
9 9
 import Mascot, {MASCOT_STYLE} from "../../../components/Mascot/Mascot";
10 10
 import MascotPopup from "../../../components/Mascot/MascotPopup";
@@ -14,9 +14,21 @@ import GridComponent from "../components/GridComponent";
14 14
 import GridManager from "../logic/GridManager";
15 15
 import Piece from "../logic/Piece";
16 16
 import * as Animatable from "react-native-animatable";
17
+import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
18
+import LinearGradient from "react-native-linear-gradient";
19
+import SpeechArrow from "../../../components/Mascot/SpeechArrow";
20
+
21
+type GameStats = {
22
+    score: number,
23
+    level: number,
24
+    time: number,
25
+}
17 26
 
18 27
 type Props = {
19 28
     navigation: StackNavigationProp,
29
+    route: {
30
+        params: GameStats
31
+    },
20 32
     theme: CustomTheme,
21 33
 }
22 34
 
@@ -27,6 +39,10 @@ type State = {
27 39
 class GameStartScreen extends React.Component<Props, State> {
28 40
 
29 41
     gridManager: GridManager;
42
+    scores: Array<number>;
43
+
44
+    gameStats: GameStats | null;
45
+    isHighScore: boolean;
30 46
 
31 47
     state = {
32 48
         mascotDialogVisible: AsyncStorageManager.getInstance().preferences.gameStartShowBanner.current === "1",
@@ -35,6 +51,30 @@ class GameStartScreen extends React.Component<Props, State> {
35 51
     constructor(props: Props) {
36 52
         super(props);
37 53
         this.gridManager = new GridManager(4, 4, props.theme);
54
+        this.scores = JSON.parse(AsyncStorageManager.getInstance().preferences.gameScores.current);
55
+        this.scores.sort((a, b) => b - a);
56
+        if (this.props.route.params != null)
57
+            this.recoverGameScore();
58
+    }
59
+
60
+    recoverGameScore() {
61
+        this.gameStats = this.props.route.params;
62
+        this.isHighScore = this.scores.length === 0 || this.gameStats.score > this.scores[0];
63
+        for (let i = 0; i < 3; i++) {
64
+            if (this.scores.length > i && this.gameStats.score > this.scores[i]) {
65
+                this.scores.splice(i, 0, this.gameStats.score);
66
+                break;
67
+            } else if (this.scores.length <= i) {
68
+                this.scores.push(this.gameStats.score);
69
+                break;
70
+            }
71
+        }
72
+        if (this.scores.length > 3)
73
+            this.scores.splice(3, 1);
74
+        AsyncStorageManager.getInstance().savePref(
75
+            AsyncStorageManager.getInstance().preferences.gameScores.key,
76
+            JSON.stringify(this.scores)
77
+        );
38 78
     }
39 79
 
40 80
     hideMascotDialog = () => {
@@ -97,10 +137,110 @@ class GameStartScreen extends React.Component<Props, State> {
97 137
                     );
98 138
                 })}
99 139
             </View>
100
-
101 140
         );
102 141
     }
103 142
 
143
+    getPostGameContent(stats: GameStats) {
144
+        return (
145
+            <View style={{
146
+                flex: 1
147
+            }}>
148
+                <Mascot
149
+                    emotion={this.isHighScore ? MASCOT_STYLE.LOVE : MASCOT_STYLE.NORMAL}
150
+                    animated={this.isHighScore}
151
+                    style={{
152
+                        width: this.isHighScore ? "50%" : "30%",
153
+                        marginLeft: this.isHighScore ? "auto" : null,
154
+                        marginRight: this.isHighScore ? "auto" : null,
155
+                    }}/>
156
+                <SpeechArrow
157
+                    style={{marginLeft: this.isHighScore ? "60%" : "20%"}}
158
+                    size={20}
159
+                    color={this.props.theme.colors.mascotMessageArrow}
160
+                />
161
+                <Card style={{
162
+                    borderColor: this.props.theme.colors.mascotMessageArrow,
163
+                    borderWidth: 2,
164
+                    marginLeft: 20,
165
+                    marginRight: 20,
166
+                }}>
167
+                    <Card.Content>
168
+                        <Headline
169
+                            style={{
170
+                                textAlign: "center",
171
+                                color: this.isHighScore
172
+                                    ? this.props.theme.colors.gameGold
173
+                                    : this.props.theme.colors.primary
174
+                            }}>
175
+                            {this.isHighScore
176
+                                ? i18n.t("screens.game.newHighScore")
177
+                                : i18n.t("screens.game.gameOver.text")}
178
+                        </Headline>
179
+                        <Divider/>
180
+                        <View style={{
181
+                            flexDirection: "row",
182
+                            marginLeft: "auto",
183
+                            marginRight: "auto",
184
+                            marginTop: 10,
185
+                            marginBottom: 10,
186
+                        }}>
187
+                            <Text style={{
188
+                                fontSize: 20,
189
+                            }}>
190
+                                {i18n.t("screens.game.score", {score: stats.score})}
191
+                            </Text>
192
+                            <MaterialCommunityIcons
193
+                                name={'star'}
194
+                                color={this.props.theme.colors.tetrisScore}
195
+                                size={30}
196
+                                style={{
197
+                                    marginLeft: 5
198
+                                }}/>
199
+                        </View>
200
+                        <View style={{
201
+                            flexDirection: "row",
202
+                            marginLeft: "auto",
203
+                            marginRight: "auto",
204
+                        }}>
205
+                            <Text>{i18n.t("screens.game.level")}</Text>
206
+                            <MaterialCommunityIcons
207
+                                style={{
208
+                                    marginRight: 5,
209
+                                    marginLeft: 5,
210
+                                }}
211
+                                name={"gamepad-square"}
212
+                                size={20}
213
+                                color={this.props.theme.colors.textDisabled}
214
+                            />
215
+                            <Text>
216
+                                {stats.level}
217
+                            </Text>
218
+                        </View>
219
+                        <View style={{
220
+                            flexDirection: "row",
221
+                            marginLeft: "auto",
222
+                            marginRight: "auto",
223
+                        }}>
224
+                            <Text>{i18n.t("screens.game.time")}</Text>
225
+                            <MaterialCommunityIcons
226
+                                style={{
227
+                                    marginRight: 5,
228
+                                    marginLeft: 5,
229
+                                }}
230
+                                name={"timer"}
231
+                                size={20}
232
+                                color={this.props.theme.colors.textDisabled}
233
+                            />
234
+                            <Text>
235
+                                {stats.time}
236
+                            </Text>
237
+                        </View>
238
+                    </Card.Content>
239
+                </Card>
240
+            </View>
241
+        )
242
+    }
243
+
104 244
     getWelcomeText() {
105 245
         return (
106 246
             <View>
@@ -109,7 +249,14 @@ class GameStartScreen extends React.Component<Props, State> {
109 249
                     marginLeft: "auto",
110 250
                     marginRight: "auto",
111 251
                 }}/>
252
+                <SpeechArrow
253
+                    style={{marginLeft: "60%"}}
254
+                    size={20}
255
+                    color={this.props.theme.colors.mascotMessageArrow}
256
+                />
112 257
                 <Card style={{
258
+                    borderColor: this.props.theme.colors.mascotMessageArrow,
259
+                    borderWidth: 2,
113 260
                     marginLeft: 10,
114 261
                     marginRight: 10,
115 262
                 }}>
@@ -131,44 +278,173 @@ class GameStartScreen extends React.Component<Props, State> {
131 278
                         </Paragraph>
132 279
                     </Card.Content>
133 280
                 </Card>
281
+            </View>
282
+        );
283
+    }
284
+
285
+    getPodiumRender(place: 1 | 2 | 3, score: string) {
286
+        let icon = "podium-gold";
287
+        let color = this.props.theme.colors.gameGold;
288
+        let fontSize = 20;
289
+        let size = 70;
290
+        if (place === 2) {
291
+            icon = "podium-silver";
292
+            color = this.props.theme.colors.gameSilver;
293
+            fontSize = 18;
294
+            size = 60;
295
+        } else if (place === 3) {
296
+            icon = "podium-bronze";
297
+            color = this.props.theme.colors.gameBronze;
298
+            fontSize = 15;
299
+            size = 50;
300
+        }
301
+        return (
302
+            <View style={{
303
+                marginLeft: place === 2 ? 20 : "auto",
304
+                marginRight: place === 3 ? 20 : "auto",
305
+                flexDirection: "column",
306
+                alignItems: "center",
307
+                justifyContent: "flex-end",
308
+            }}>
309
+                {
310
+                    this.isHighScore && place === 1
311
+                        ?
312
+                        <Animatable.View
313
+                            animation={"swing"}
314
+                            iterationCount={"infinite"}
315
+                            duration={2000}
316
+                            delay={1000}
317
+                            useNativeDriver={true}
318
+                            style={{
319
+                                position: "absolute",
320
+                                top: -20
321
+                            }}
322
+                        >
323
+                            <Animatable.View
324
+                                animation={"pulse"}
325
+                                iterationCount={"infinite"}
326
+                                useNativeDriver={true}
327
+                            >
328
+                                <MaterialCommunityIcons
329
+                                    name={"decagram"}
330
+                                    color={this.props.theme.colors.gameGold}
331
+                                    size={150}
332
+                                />
333
+                            </Animatable.View>
334
+                        </Animatable.View>
134 335
 
336
+                        : null
337
+                }
338
+                <MaterialCommunityIcons
339
+                    name={icon}
340
+                    color={this.isHighScore && place === 1 ? "#fff" : color}
341
+                    size={size}
342
+                />
343
+                <Text style={{
344
+                    textAlign: "center",
345
+                    fontWeight: place === 1 ? "bold" : null,
346
+                    fontSize: fontSize,
347
+                }}>{score}</Text>
135 348
             </View>
136 349
         );
137 350
     }
138 351
 
352
+    getTopScoresRender() {
353
+        const gold = this.scores.length > 0
354
+            ? this.scores[0]
355
+            : "-";
356
+        const silver = this.scores.length > 1
357
+            ? this.scores[1]
358
+            : "-";
359
+        const bronze = this.scores.length > 2
360
+            ? this.scores[2]
361
+            : "-";
362
+        return (
363
+            <View style={{
364
+                marginBottom: 20,
365
+                marginTop: 20
366
+            }}>
367
+                {this.getPodiumRender(1, gold.toString())}
368
+                <View style={{
369
+                    flexDirection: "row",
370
+                    marginLeft: "auto",
371
+                    marginRight: "auto",
372
+                }}>
373
+                    {this.getPodiumRender(3, bronze.toString())}
374
+                    {this.getPodiumRender(2, silver.toString())}
375
+                </View>
376
+            </View>
377
+        );
378
+    }
379
+
380
+    getMainContent() {
381
+        return (
382
+            <LinearGradient
383
+                style={{flex: 1}}
384
+                colors={[
385
+                    this.props.theme.colors.background + "00",
386
+                    this.props.theme.colors.background
387
+                ]}
388
+                start={{x: 0, y: 0.1}}
389
+                end={{x: 0.1, y: 1}}
390
+            >
391
+                <View style={{flex: 1}}>
392
+                    {
393
+                        this.gameStats != null
394
+                            ? this.getPostGameContent(this.gameStats)
395
+                            : this.getWelcomeText()
396
+                    }
397
+                    <Button
398
+                        icon={"play"}
399
+                        mode={"contained"}
400
+                        onPress={() => this.props.navigation.replace(
401
+                            "game-main",
402
+                            {
403
+                                highScore: this.scores.length > 0
404
+                                    ? this.scores[0]
405
+                                    : null
406
+                            }
407
+                        )}
408
+                        style={{
409
+                            marginLeft: "auto",
410
+                            marginRight: "auto",
411
+                            marginTop: 10,
412
+                        }}
413
+                    >
414
+                        {i18n.t("screens.game.play")}
415
+                    </Button>
416
+                    {this.getTopScoresRender()}
417
+                </View>
418
+            </LinearGradient>
419
+        )
420
+    }
421
+
422
+    keyExtractor = (item: number) => item.toString();
423
+
139 424
     render() {
140 425
         return (
141 426
             <View style={{flex: 1}}>
142 427
                 {this.getPiecesBackground()}
143
-                {this.getWelcomeText()}
144
-                <Button
145
-                    icon={"play"}
146
-                    mode={"contained"}
147
-                    onPress={() => this.props.navigation.navigate("game-main")}
148
-                    style={{
149
-                        marginLeft: "auto",
150
-                        marginRight: "auto",
151
-                        marginTop: 10,
152
-                    }}
153
-                >
154
-                    {i18n.t("screens.game.play")}
155
-                </Button>
156
-                <MascotPopup
157
-                    visible={this.state.mascotDialogVisible}
158
-                    title={i18n.t("screens.game.mascotDialog.title")}
159
-                    message={i18n.t("screens.game.mascotDialog.message")}
160
-                    icon={"gamepad-variant"}
161
-                    buttons={{
162
-                        action: null,
163
-                        cancel: {
164
-                            message: i18n.t("screens.game.mascotDialog.button"),
165
-                            icon: "check",
166
-                            onPress: this.hideMascotDialog,
167
-                        }
168
-                    }}
169
-                    emotion={MASCOT_STYLE.COOL}
170
-                />
428
+                <ScrollView>
429
+                    {this.getMainContent()}
430
+                    <MascotPopup
431
+                        visible={this.state.mascotDialogVisible}
432
+                        title={i18n.t("screens.game.mascotDialog.title")}
433
+                        message={i18n.t("screens.game.mascotDialog.message")}
434
+                        icon={"gamepad-variant"}
435
+                        buttons={{
436
+                            action: null,
437
+                            cancel: {
438
+                                message: i18n.t("screens.game.mascotDialog.button"),
439
+                                icon: "check",
440
+                                onPress: this.hideMascotDialog,
441
+                            }
442
+                        }}
443
+                        emotion={MASCOT_STYLE.COOL}
444
+                    />
445
+                </ScrollView>
171 446
             </View>
447
+
172 448
         );
173 449
     }
174 450
 }

Loading…
Cancel
Save