fix(game): forgot to add menu
This commit is contained in:
1 parent
9f61b3e53c
commit
ba5be77ae5
3 files changed
+4
-2
No files matched your search
@@ -32,6 +32,7 @@ export function Dust({ count = 500, opacity = 0.1, size = 0.6 }) {
|
||||
let time = 0
|
||||
let i = 0
|
||||
useFrame((state,delta ) => {
|
||||
if(!leftWheel && !rightWheel) return;
|
||||
const rotation = leftWheel.kartRotation;
|
||||
if (state.clock.getElapsedTime() - time > 0.02 && leftWheel && rightWheel && ref.current && leftWheel.isSpinning) {
|
||||
time = state.clock.getElapsedTime()
|
||||
|
||||
@@ -19,6 +19,7 @@ export function Skid({ count = 50000, opacity = 0.5, size = 0.3 }) {
|
||||
const { leftWheel, rightWheel } = useStore();
|
||||
let index = 0
|
||||
useFrame(() => {
|
||||
if(!leftWheel && !rightWheel) return;
|
||||
const rotation = leftWheel.kartRotation;
|
||||
if (leftWheel && rightWheel && ref.current && (leftWheel.isSpinning || rightWheel.isSpinning)) {
|
||||
setItemAt(ref.current, rotation, leftWheel, index++);
|
||||
|
||||
@@ -13,8 +13,8 @@ export const items = [
|
||||
]
|
||||
|
||||
export const useStore = create((set, get) => ({
|
||||
gameStarted: true,
|
||||
controls: "gamepad",
|
||||
gameStarted: false,
|
||||
controls: "",
|
||||
particles1: [],
|
||||
particles2: [],
|
||||
leftWheel: null,
|
||||
|
||||
Reference in new issue
Block a user