Browse Source

default state

pull/8/head
Tim Glasgow 2 years ago
parent
commit
976a5b69ba
  1. 2
      squarenotsquare/src/components/Fade.js
  2. 3
      squarenotsquare/src/screens/Game.js

2
squarenotsquare/src/components/Fade.js

@ -3,7 +3,7 @@ import { Animated} from "react-native";
import { useEffect, useRef } from "react";
function Fade(props){
const faded = useRef(new Animated.Value(0.25));
const faded = useRef(new Animated.Value(0.1));
const opaque = useRef(new Animated.Value(1));
useEffect(() => {

3
squarenotsquare/src/screens/Game.js

@ -14,7 +14,7 @@ import Metrics from "../themes/Metrics";
function Game(props){
const squareChallenge = useRef(genSquareChallenge());
const challengeState = useRef(0);
const challengeState = useRef(-1);
const squareMemo = useMemo(renderPairs, [challengeState.current]);
const [timerState, setTimerState] = useState(0);
const localTimer = useRef(null);
@ -41,6 +41,7 @@ function Game(props){
setHeaderColor(styles.red);
setHeaderTextColor(styles.lightText);
setHeaderText('Go!');
challengeState.current = 0;
setTimerState(2);
}, 1000);
break;

Loading…
Cancel
Save