Update Cyberpunk2077 Game

This commit is contained in:
nickofolas 2022-04-24 14:57:18 -05:00
parent 4bf6acf95c
commit b3879e386f

@ -5,11 +5,11 @@ import { KeyHandler } from "./KeyHandler";
import { GameTimer } from "./GameTimer"; import { GameTimer } from "./GameTimer";
import { interpolate } from "./Difficulty"; import { interpolate } from "./Difficulty";
import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils";
import Typography from "@mui/material/Typography";
import { KEY } from "../../utils/helpers/keyCodes"; import { KEY } from "../../utils/helpers/keyCodes";
import { Settings } from "../../Settings/Settings"; import { Settings } from "../../Settings/Settings";
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
import { Player } from "../../Player"; import { Player } from "../../Player";
import { Paper, Typography, Box } from "@mui/material";
interface Difficulty { interface Difficulty {
[key: string]: number; [key: string]: number;
@ -78,9 +78,9 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {
const fontSize = "2em"; const fontSize = "2em";
return ( return (
<Grid container spacing={3}> <>
<GameTimer millis={timer} onExpire={props.onFailure} /> <GameTimer millis={timer} onExpire={props.onFailure} />
<Grid item xs={12}> <Paper sx={{ display: "grid", justifyItems: "center" }}>
<Typography variant="h4">Match the symbols!</Typography> <Typography variant="h4">Match the symbols!</Typography>
<Typography variant="h5" color={Settings.theme.primary}> <Typography variant="h5" color={Settings.theme.primary}>
Targets:{" "} Targets:{" "}
@ -125,8 +125,8 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {
</div> </div>
))} ))}
<KeyHandler onKeyDown={press} onFailure={props.onFailure} /> <KeyHandler onKeyDown={press} onFailure={props.onFailure} />
</Grid> </Paper>
</Grid> </>
); );
} }