Compare commits

..

4 Commits

Author SHA1 Message Date
Vikeo
e692454b96 bump 2024-04-01 00:28:46 +02:00
Vikeo
71321e98dc start menu styling 2024-04-01 00:28:17 +02:00
Vikeo
c381b87c48 hide scrollbar on desktop 2024-04-01 00:27:25 +02:00
Viktor Rådberg
aa479e67bf save 2024-03-31 23:26:04 +02:00
5 changed files with 9 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "life-trinket",
"private": true,
"version": "0.9.7",
"version": "0.9.5",
"type": "commonjs",
"engines": {
"node": ">=18",

View File

@@ -2,7 +2,6 @@ import { Checkbox } from '@mui/material';
import { useRef } from 'react';
import { twc } from 'react-twc';
import { theme } from '../../Data/theme';
import { useAnalytics } from '../../Hooks/useAnalytics';
import { useGlobalSettings } from '../../Hooks/useGlobalSettings';
import { usePlayers } from '../../Hooks/usePlayers';
import { useSafeRotate } from '../../Hooks/useSafeRotate';
@@ -18,8 +17,8 @@ import {
ResetGame,
} from '../../Icons/generated';
import { Player, Rotation } from '../../Types/Player';
import { PreStartMode } from '../../Types/Settings';
import { RotationDivProps } from '../Buttons/CommanderDamage';
import { useAnalytics } from '../../Hooks/useAnalytics';
const PlayerMenuWrapper = twc.div`
flex
@@ -113,7 +112,6 @@ const PlayerMenu = ({
setRandomizingPlayer,
saveCurrentGame,
initialGameSettings,
setPreStartCompleted,
} = useGlobalSettings();
const analytics = useAnalytics();
@@ -135,14 +133,8 @@ const PlayerMenu = ({
const handleResetGame = () => {
resetCurrentGame();
setShowPlayerMenu(false);
setPlaying(false);
if (settings.preStartMode === PreStartMode.RandomKing) {
setRandomizingPlayer(true);
setPreStartCompleted(false);
}
analytics.trackEvent('reset_game');
};

View File

@@ -14,10 +14,6 @@ const getOrientation = () => {
: 'landscape';
};
const ANIMATION_INTRO_LENGTH = 500;
const BEFORE_INTRO_TIMER_LENGTH = 100;
export const FingerGame = () => {
const { players } = usePlayers();
@@ -38,7 +34,7 @@ export const FingerGame = () => {
aboutToStartTimerRef.current = setTimeout(() => {
setSelectedTouchPoint(undefined);
setPlaying(true);
}, ANIMATION_INTRO_LENGTH);
}, 500);
setTimerStarted(true);
return;
@@ -50,7 +46,7 @@ export const FingerGame = () => {
const randomIndex = Math.floor(Math.random() * touchPoints.length);
const randomTouchPoint = touchPoints[randomIndex];
setSelectedTouchPoint(randomTouchPoint);
}, BEFORE_INTRO_TIMER_LENGTH);
}, 250);
return;
}
@@ -103,7 +99,7 @@ export const FingerGame = () => {
aboutToStartTimerRef.current = setTimeout(() => {
setSelectedTouchPoint(undefined);
setPlaying(true);
}, ANIMATION_INTRO_LENGTH);
}, 500);
setTimerStarted(true);
return;
}
@@ -184,7 +180,7 @@ export const FingerGame = () => {
key={`touch-point-${index}`}
data-is-selected={selectedTouchPoint?.id === point.id}
data-unloading={timerStarted}
className="absolute rounded-full translate-x-[-50%] translate-y-[-50%] transition-all duration-500
className="absolute rounded-full translate-x-[-50%] translate-y-[-50%] transition-all duration-1000
h-[75px] w-[75px]
data-[unloading=false]:data-[is-selected=true]:h-[250px] data-[unloading=false]:data-[is-selected=true]:w-[250px]
data-[unloading=true]:h-[0px] data-[unloading=true]:w-[0px] data-[unloading=true]:duration-[400ms]

View File

@@ -8,7 +8,8 @@ const questions = [
'Who has the most piercings?',
'Who has the most expensive shoes?',
'Who has the most most amount of teeth?',
'Who has the least amount of teeth?',
'Who has the most least amount of teeth?',
'Who has the most least amount of teeth?',
'Who lives closest to the equator?',
'Who is the tallest person in the group?',
'Who is the shortest person in the group?',

View File

@@ -95,7 +95,6 @@ export const Play = () => {
}, []);
if (
players.length > 1 &&
!preStartCompleted &&
settings.preStartMode !== PreStartMode.None &&
!playing &&