mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
Update basic Game code
This commit is contained in:
parent
ab034f6f1a
commit
217f6d1e57
@ -1,19 +1,17 @@
|
||||
import { use } from "../../ui/Context";
|
||||
import { Button, Container, Paper, Typography } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import Button from "@mui/material/Button";
|
||||
import { Countdown } from "./Countdown";
|
||||
import { BracketGame } from "./BracketGame";
|
||||
import { SlashGame } from "./SlashGame";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { use } from "../../ui/Context";
|
||||
import { BackwardGame } from "./BackwardGame";
|
||||
import { BracketGame } from "./BracketGame";
|
||||
import { BribeGame } from "./BribeGame";
|
||||
import { CheatCodeGame } from "./CheatCodeGame";
|
||||
import { Countdown } from "./Countdown";
|
||||
import { Cyberpunk2077Game } from "./Cyberpunk2077Game";
|
||||
import { MinesweeperGame } from "./MinesweeperGame";
|
||||
import { WireCuttingGame } from "./WireCuttingGame";
|
||||
import { SlashGame } from "./SlashGame";
|
||||
import { Victory } from "./Victory";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { WireCuttingGame } from "./WireCuttingGame";
|
||||
|
||||
interface IProps {
|
||||
StartingDifficulty: number;
|
||||
@ -113,7 +111,7 @@ export function Game(props: IProps): React.ReactElement {
|
||||
stageComponent = <Countdown onFinish={() => setStage(Stage.Minigame)} />;
|
||||
break;
|
||||
case Stage.Minigame: {
|
||||
const MiniGame = minigames[gameIds.id];
|
||||
const MiniGame = SlashGame; // minigames[gameIds.id];
|
||||
stageComponent = <MiniGame onSuccess={success} onFailure={failure} difficulty={props.Difficulty + level / 50} />;
|
||||
break;
|
||||
}
|
||||
@ -139,22 +137,18 @@ export function Game(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={3}>
|
||||
<Button onClick={cancel}>Cancel</Button>
|
||||
</Grid>
|
||||
<Grid item xs={3}>
|
||||
<Typography>
|
||||
Level: {level} / {props.MaxLevel}
|
||||
</Typography>
|
||||
<Progress />
|
||||
</Grid>
|
||||
<Container>
|
||||
<Paper sx={{ p: 1, mb: 1, display: "grid", justifyItems: "center", gap: 1 }}>
|
||||
<Button sx={{ width: "100%" }} onClick={cancel}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Typography variant="h5">
|
||||
Level {level} / {props.MaxLevel}
|
||||
</Typography>
|
||||
<Progress />
|
||||
</Paper>
|
||||
|
||||
<Grid item xs={12}>
|
||||
{stageComponent}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</>
|
||||
{stageComponent}
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user