Closed boexelfauyenra closed 1 month ago
import React, { useState, useEffect } from 'react'; import { View, StyleSheet, Text, Animated, Easing } from 'react-native'; import { Button } from 'react-native-paper';
const App = () => { const [round, setRound] = useState(0); const [gameStarted, setGameStarted] = useState(false); const fadeAnim = new Animated.Value(0);
const startGame = () => { setGameStarted(true); setRound(1); fadeIn(); };
const newRound = () => { setRound(prevRound => prevRound + 1); fadeIn(); };
const fadeIn = () => { fadeAnim.setValue(0); Animated.timing(fadeAnim, { toValue: 1, duration: 500, easing: Easing.inOut(Easing.ease), useNativeDriver: true, }).start(); };
return (
); };
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#f4f4f4', }, roundContainer: { alignItems: 'center', }, roundText: { fontSize: 24, marginBottom: 20, }, button: { marginTop: 20, }, });
export default App;
import React, { useState, useEffect } from 'react'; import { View, StyleSheet, Text, Animated, Easing } from 'react-native'; import { Button } from 'react-native-paper';
const App = () => { const [round, setRound] = useState(0); const [gameStarted, setGameStarted] = useState(false); const fadeAnim = new Animated.Value(0);
const startGame = () => { setGameStarted(true); setRound(1); fadeIn(); };
const newRound = () => { setRound(prevRound => prevRound + 1); fadeIn(); };
const fadeIn = () => { fadeAnim.setValue(0); Animated.timing(fadeAnim, { toValue: 1, duration: 500, easing: Easing.inOut(Easing.ease), useNativeDriver: true, }).start(); };
return (
); };
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#f4f4f4', }, roundContainer: { alignItems: 'center', }, roundText: { fontSize: 24, marginBottom: 20, }, button: { marginTop: 20, }, });
export default App;